Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp609256ybi; Fri, 24 May 2019 08:37:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBA1codQnqebWThpcBHx61fnjR5kTkz4B0SUHxoG6kklz3M7eVwkoGSqiYzhPtdyor4qli X-Received: by 2002:a17:902:8d96:: with SMTP id v22mr32171567plo.282.1558712256294; Fri, 24 May 2019 08:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558712256; cv=none; d=google.com; s=arc-20160816; b=S2eDnhtZbG5ThE6lsTaPaQ6WZVXL7qEESV29G60AuXA6RKk9+w5ycjfyBwoknRCMWx XPip5bS5d8XxwAvtQUi5VOFwvCDxFafTgPxzCGOjAhmCM9Wguo28tk5dGDrO54WyrbKF naXBxDUWqNClvsYsnZG1RJQjxNSvaxWfc/9L6+3NY1JIz+zQtL9LNFhsBUCLWXXNtM65 cykgT9w6dT7yMRX7DloTXaz2LY2w+j8XXZPO6BhxJTyBvOn9/IJf9om8X788UxQe0tTR 3XsTRIWzdfaiX1tZORsPNjuCSgJul+woNl11oNSYtZ1HnjfcUqUahmHTW3SAmpo991MW fD5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yr9SuSgJcQmXUlZFQ7lwiMnKS2BHo2uA+j1WQjZheiI=; b=x0VF5gjZwh1D9M5bbs7KP6JvFHj0twq0nG59QsM/vhOGRvqCNdblqmbatYTK97QOKl cs4jpQi22RAUgRt6sMloQu13QGiXgRpDZ+byjESKO4Dw4GDTzOKWJmRv/FbcAAiGkq3T 86ldeBLYdgLkp52deQwXsvi10Kq8jHH/GU29Km/UrhIlmImu9x5GbQUbC3dwEIMyZfe1 VhhCIJ7amsODIFteKDC1iAjQ28cA5KB3Yt+7GzoDjrzyUD0NiVruQvAQIawbaY+g776A KAB8D4xueDb2d8dEBo8/jRRNuujsYD1zQDNMb4TJLfmt0nroT4k8RkHZ4aEASC+HsSc4 ewfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AUHxs0Ag; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si4872909pfi.32.2019.05.24.08.37.09; Fri, 24 May 2019 08:37:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AUHxs0Ag; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390203AbfEXPfg (ORCPT + 99 others); Fri, 24 May 2019 11:35:36 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38441 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389914AbfEXPfd (ORCPT ); Fri, 24 May 2019 11:35:33 -0400 Received: by mail-lj1-f193.google.com with SMTP id 14so9050903ljj.5; Fri, 24 May 2019 08:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yr9SuSgJcQmXUlZFQ7lwiMnKS2BHo2uA+j1WQjZheiI=; b=AUHxs0Ag5lvuWYV6wXlSUWoM94eFyrXLuLnlZvzZZET0r2x34qIUfH86KUeXmz8KxP 6ojeTF+EtC9J9CabTRxki6pl6l3z9wT+RluRahLMmeiTOryq2xjj8lSOXR1AjWaJzIqT HDvMEcuMTUnRf+zWghMkEPYeAxAXd+TO0jHewbjKHEPLW1s7w5kszc6Jz8VycMbysNYK UE/WWBNKnrO6kjMi1edXBWq8C+9SkVwuu2TVoHUb60jSvXU5oa0YCOY/5SFaCz6kv6Lp ukE1LaGlqq1y293RQbKJOgIrjjOCHbty8AB9yx3/CmgMH3zs8HMTa5katKqTtcIulgN4 nzFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yr9SuSgJcQmXUlZFQ7lwiMnKS2BHo2uA+j1WQjZheiI=; b=Achf2/9h/88a1Wy61XjiO1sjTOfUAf3pOxjY/Z/nczQCEDdHCG0NUdYJvsrf934h8t gRzL0dsKkDb07txbCBhhTD4TcTckhmNc/+2PpOQcinXj4kKsgtnHzqtCEOFuay6d4wzD d6DOXu2XxZkIdX/y/dd8+fmfcTuq7H+u+pYFV+ts2FsXSHdE30itTpJ4igg3Az4JpZcx I8ezepUJKQh900nnEAcmc9dYQ/fV2+p86pao3sPdO4S7KG2AMZKAOm7XcQx6YH4EThMm rSYzYTHxA0bGCpWON/tWCHuzd9QPQcxghwwK2FlpTyXTNgdSm7c3w5UwbVAFrRfCqQsk Sjzg== X-Gm-Message-State: APjAAAXKiqAYL/C8teii728JAPSL3tATQGa4hJ1RhKJeZyumVWsS1Ir5 6Mb02x0e35bGzmMMvk5J8Kc= X-Received: by 2002:a2e:87c9:: with SMTP id v9mr25451712ljj.100.1558712131285; Fri, 24 May 2019 08:35:31 -0700 (PDT) Received: from localhost.localdomain ([94.29.35.141]) by smtp.gmail.com with ESMTPSA id y14sm572316ljh.60.2019.05.24.08.35.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 08:35:30 -0700 (PDT) From: Dmitry Osipenko To: Daniel Lezcano , Thomas Gleixner , Joseph Lo , Thierry Reding , Jonathan Hunter , Peter De Schrijver Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Chauvet Subject: [PATCH v3 5/8] clocksource/drivers/tegra: Release all IRQ's on request_irq() error Date: Fri, 24 May 2019 18:32:50 +0300 Message-Id: <20190524153253.28564-6-digetx@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190524153253.28564-1-digetx@gmail.com> References: <20190524153253.28564-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Release all requested IRQ's on the request error to properly clean up allocated resources. Signed-off-by: Dmitry Osipenko --- drivers/clocksource/timer-tegra20.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/timer-tegra20.c b/drivers/clocksource/timer-tegra20.c index 55e9b3e1fbeb..18b81d814b3b 100644 --- a/drivers/clocksource/timer-tegra20.c +++ b/drivers/clocksource/timer-tegra20.c @@ -293,7 +293,7 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20) pr_err("%s: can't map IRQ for CPU%d\n", __func__, cpu); ret = -EINVAL; - goto out; + goto out_irq; } irq_set_status_flags(cpu_to->clkevt.irq, IRQ_NOAUTOEN); @@ -303,7 +303,8 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20) if (ret) { pr_err("%s: cannot setup irq %d for CPU%d\n", __func__, cpu_to->clkevt.irq, cpu); - ret = -EINVAL; + irq_dispose_mapping(cpu_to->clkevt.irq); + cpu_to->clkevt.irq = 0; goto out_irq; } } -- 2.21.0