Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353954pxb; Mon, 20 Sep 2021 19:52:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYXg1syToDgcgeygflZI4UpHJjaCE7gfrqbOFn2cAp/P+zDBmEZflT2AqFzr0H7norZomz X-Received: by 2002:a02:6048:: with SMTP id d8mr6952558jaf.61.1632192774106; Mon, 20 Sep 2021 19:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192774; cv=none; d=google.com; s=arc-20160816; b=F5FgpdV0pJmwbjzmSP1USA2yiZog7yFfeFXbt1gRaNmeekNsQCZPU1F9zDEuZd0FOD WGrygfpyEl2PSKKrnfLcYA6LvGrR37plVF20z75ZZaY4OBkM75Qqzzm24dSbb2rt7Kgh HpkMpMbY66faUKohoAM8VEmEpgsUgRePxwxOirKsRjCwl/s5BRPO3FyVykJYO7NiEMF8 JkBs1x1pcIBCBX+x6D7eMYNmBTe9tcLRxEie+bsspSOhbi/gqSP14ZPQYvP/56rzcPNC rXQIky+Eu5xfbqb2jPJvfu0ur+jiSnv3u0u6aIh/SgZQjFyPYImGkyR18b9wZrimlKy8 H3RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Woe2UgZlZdSvMJj0WvbS3EpSHD3hsijdZUBFswoZets=; b=KxRzp8VvSo6LFsB1NWalIOIvr4pOnFfY4TwUMjlMM2kvmlIYZhXj2nKXldIWdOQenB AL782OrFT+XD7FiHWKUIZloPAbNOcxuVjb4zrCgrLx78NrUqjAXPh6UkF/yIuBVPEovD jSdWxu0VwteyZ+PRXlVoPgbH6sYkB07yT9X1xpM+gYy60jmGR16nvA/kFPu6nf4kZS2J hKhs9iIk1qjhbSaLKt8EzT6WIgURjIs/U+kD1nswbLGQhk+qq/c7yyC4edWc7j2myMzq ghHnk/U4mWXupE7uQs4lFgaMg1dJ+hQc5NKOGZqd3TIHxi55/w0EG6Pyex0o8c9KKyRe 1JXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IkkaOZDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si1686260ilv.168.2021.09.20.19.52.43; Mon, 20 Sep 2021 19:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IkkaOZDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345183AbhITS5Q (ORCPT + 99 others); Mon, 20 Sep 2021 14:57:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:33244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384562AbhITSsV (ORCPT ); Mon, 20 Sep 2021 14:48:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B1CBB6336B; Mon, 20 Sep 2021 17:34:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159244; bh=8+jA5Z2hfzZdTYeIsooOYKRrNlVHMu4dfpmOl8t+vBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IkkaOZDcw2WGdgXhsuc9P09EwI0SNe55k5l1nrlQ1yCCMJ+CcqMVq1vXauISvkmnc DgDvjFSyLdCJ/+BQtfjVzsKcQwXZJ+OZuM4Q2kW0vqKaNOcUbchqDAcpeohSzaszCT N3XjyGpPgi3DSf8lnTM7+TPoBjVDkFsAkYBHcTt8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.14 143/168] gpio: mpc8xxx: Fix a resources leak in the error handling path of mpc8xxx_probe() Date: Mon, 20 Sep 2021 18:44:41 +0200 Message-Id: <20210920163926.357983684@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 555bda42b0c1a5ffb72d3227c043e8afde778f1f ] Commit 698b8eeaed72 ("gpio/mpc8xxx: change irq handler from chained to normal") has introduced a new 'goto err;' at the very end of the function, but has not updated the error handling path accordingly. Add the now missing 'irq_domain_remove()' call which balances a previous 'irq_domain_create_linear() call. Fixes: 698b8eeaed72 ("gpio/mpc8xxx: change irq handler from chained to normal") Signed-off-by: Christophe JAILLET Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpio-mpc8xxx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 50b321a1ab1b..9acfa25ad6ee 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -416,6 +416,8 @@ static int mpc8xxx_probe(struct platform_device *pdev) return 0; err: + if (mpc8xxx_gc->irq) + irq_domain_remove(mpc8xxx_gc->irq); iounmap(mpc8xxx_gc->regs); return ret; } -- 2.30.2