Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352315pxb; Mon, 20 Sep 2021 19:49:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQvnX80cz2UlThLK6dnYM+482ukxcJU9RywKNpQOm+a5rD566vjzLyb16R//TvcPQnBOLX X-Received: by 2002:a05:6e02:551:: with SMTP id i17mr19865826ils.281.1632192562846; Mon, 20 Sep 2021 19:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192562; cv=none; d=google.com; s=arc-20160816; b=IgpKTU2f634ew2Fgx7wK0z+RLuPSG4JDbQmij2oNBQRlQC2jMTBz0ra/4/hLjvzmjX SvPh4VX6guMJ08xs+8AG6utW9+a1w+Wsp6qtcJomQX9irnVuta4DNVjQ8ETf4WKw4Wui yGGC0DSnl07zW4Z954ZiUf6h0SlxIuoFL4yl7F9DOL42vfkmvDBbsFhk2/UJB9YdZLUL RUbmr5k21G5E1fzWs5SJZ2cZYdMb+Vrx3g1sibbDw2Gjjn4CiXDTMV1vR8S9E8DMwInT bgDlQ2SN9c74/UNM7pqQJqUZdM26M2PVQBkmmnYnbmnE8+bTZTKFrlQpxgJAtiIRjmgO fcxg== 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=gZSkjWjUdIkmoUj/z3gRl1RW6KmJTvG/G3za9oxqwD0=; b=bhIlsx5cgDDzFZtYtRV31I8U+iNoz5+zdhQK7n3Xv3Kv4oKWITI/NaZYxQxVwYh4tq CaAkduRCJK1n4ZaAfoJbOhXY7ItnWQI73FhZtyLGUXZHlk3QfhJ+D3iCRirPqy6cfZ3u xn1QTKwiqo+pZAi+cEpMXbHDUNYcGyjeWq2Moi2XvgUasbLYXVLDVGDoe6isDZmuz0X/ qkpxcnYxx+xAsNT5zWZ+eykS1NP9TW+rDpCgbM0rw7uwZPK84RCabcUzPQqWlO17OHz9 5jcZ53q9M1ZEuAmbgAVTFQp0sEW2qXfiVxYyiohn96ko5GKu8yPXKCYSipLTiCiOtLHG 97Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Goy05qD2; 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 x9si8691171ilg.115.2021.09.20.19.49.10; Mon, 20 Sep 2021 19:49:22 -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=Goy05qD2; 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 S1382133AbhITSkG (ORCPT + 99 others); Mon, 20 Sep 2021 14:40:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:52158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380896AbhITSfB (ORCPT ); Mon, 20 Sep 2021 14:35:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 58EA063311; Mon, 20 Sep 2021 17:28:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158939; bh=IXZIPmogRXfq9EqsOwfePQHSv7qJQzlfsXqwOOkqn7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Goy05qD2FGFsJmT3QLjRmS1k2yH56guKR8PHb7jR+rVtpXXT2ADwqtJTNIrcVilHt x6EQEuhPyCjzny0R0eVHv4VTLTtNc1B4bseyEVi/e2OLRcg5qNaF96Z2VD/ylNIoV0 NerxDFJv9aA6sYltAnBnTFXdBKiReiwIn275zpUw= 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.10 099/122] gpio: mpc8xxx: Fix a resources leak in the error handling path of mpc8xxx_probe() Date: Mon, 20 Sep 2021 18:44:31 +0200 Message-Id: <20210920163919.032848290@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163915.757887582@linuxfoundation.org> References: <20210920163915.757887582@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 3c2fa44d9279..5b2a919a6644 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -406,6 +406,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