Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10410086ybi; Wed, 24 Jul 2019 22:43:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJ20FuHgZE1yulKidwFkHFPV+Y+7a3csobYTOYoPlZzZDMpYjb9odQw/xHJMCtEer5dTb7 X-Received: by 2002:a17:902:e281:: with SMTP id cf1mr86430068plb.271.1564033382463; Wed, 24 Jul 2019 22:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564033382; cv=none; d=google.com; s=arc-20160816; b=eDIpAUcA+Okq8MNgALRlWOmu+PR6l+To/ED5C4XYfDeUfiFhR5801egUSnNYh+9dkT 1ECQdjDWBoWPHuJHB+e1r64osyQ6UlqgqMxOqjp6/+cUoy+qKrl40H+MM4Y1Yww5wbqP f2lM0v2j1IQVETVMSQlISFa4z6m4AasnXU/0UqYVGakySq2CGziTpniPKMq4iBIUO5VH 3nhjtS1JGMPmKimRl3O28/4dbtvVR5Pc/VpTZB84CuTiIvxUe4aa4mr7iwdZGqcx74zF EiNSWPOVW/CKu4DlTOfBV+QSTiYzzcjiYdkulY/qV4oU+hjZc6JsmxlTcLJyFMKZXB3h nIPQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JCIJRifus8lFGqE3A9q4UymiJ4IPGKdccYg5HacUUFg=; b=Sf/0Hjgk9hTLNuSPKNuI4B4ef6l6VasNN0lVOdavIPEYHodPNbndzDo51/ZCiPJuma UX2CaEBkJfDl8UsKKFFElzsu/QEbL1KCe1JjyTE9Zl10CJWYe+abf5mMCdjRT2jP9RJd 29rYPpQbwrq8pPPg9oXbBLCFEWR+InPx5BiTAU6At1U89Xx8YN6FOzoDNzUWrOrUhYG8 RRbVDDGo9uUW73b5aGvu4kbri5AsK3+3rOZ2y50tsnwjJcGwUHEyt5qNsz+YjEftQbkz nTktQkDaWaCmzfv/e758IfTZnn9zUvHd51TpXhuO79ajpnBvDUEtruASRzkmu180Ln0Q 1asw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=feBtSjrZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h63si14848554pje.79.2019.07.24.22.42.47; Wed, 24 Jul 2019 22:43:02 -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=@kernel.org header.s=default header.b=feBtSjrZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392879AbfGXURY (ORCPT + 99 others); Wed, 24 Jul 2019 16:17:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:58784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729137AbfGXTuN (ORCPT ); Wed, 24 Jul 2019 15:50:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA7B7205C9; Wed, 24 Jul 2019 19:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997812; bh=s0/aSiakoN1afCX/3HrsVhB1VWD5uK6b+N50eKLyzdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=feBtSjrZ7F3wH7DjRcDYIV5e5jEUN7KcIUzS5EBvaOGNzojX9cdCwWrfsPEhbiFgr HJ3B4XJ+HFZJUHyC63W9gbV4GZC0/l2C1FNuGGFv1elUzeiFpFONZh82+sUW7iwfAb OLE/DIchIhT0ehpqID5HwqklyYcISXH/O2Z41RXI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , Peter De Schrijver , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.1 151/371] clocksource/drivers/tegra: Release all IRQs on request_irq() error Date: Wed, 24 Jul 2019 21:18:23 +0200 Message-Id: <20190724191736.545955774@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 7a3916706e858ad0bc3b5629c68168e1449de26a ] Release all requested IRQ's on the request error to properly clean up allocated resources. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano Signed-off-by: Sasha Levin --- 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 fdb3d795a409..cc18bb135a17 100644 --- a/drivers/clocksource/timer-tegra20.c +++ b/drivers/clocksource/timer-tegra20.c @@ -310,7 +310,7 @@ static int __init tegra_init_timer(struct device_node *np) 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); @@ -320,7 +320,8 @@ static int __init tegra_init_timer(struct device_node *np) 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.20.1