mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Lorenzo Pieralisi" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/urgent] irqchip/gic-v5: iwb: Fix iounmap probe failure path
Date: Tue, 05 Aug 2025 08:48:30 -0000	[thread overview]
Message-ID: <175438371006.1420.11472579450134368633.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250801-gic-v5-fixes-6-17-v1-1-4fcedaccf9e6@kernel.org>

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     a8913d54ab1f9ed871b4e45a7c8a4f7a9949d071
Gitweb:        https://git.kernel.org/tip/a8913d54ab1f9ed871b4e45a7c8a4f7a9949d071
Author:        Lorenzo Pieralisi <lpieralisi@kernel.org>
AuthorDate:    Fri, 01 Aug 2025 09:58:18 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 05 Aug 2025 10:43:48 +02:00

irqchip/gic-v5: iwb: Fix iounmap probe failure path

The 0-day bot reported that on the failure path the driver iounmap()s IWB
resources that are managed through devm_ioremap(), which is clearly wrong
because the driver would end up unmapping the MMIO resource twice on
probing failure.

Fix this by removing the error path altogether and by letting devres manage
the iounmapping on clean-up.

Fixes: 695949d8b16f ("irqchip/gic-v5: Add GICv5 IWB support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/all/20250801-gic-v5-fixes-6-17-v1-1-4fcedaccf9e6@kernel.org
Closes: https://lore.kernel.org/oe-kbuild-all/202508010038.N3r4ZmII-lkp@intel.com
---
 drivers/irqchip/irq-gic-v5-iwb.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
index ed72fbd..ad9fdc1 100644
--- a/drivers/irqchip/irq-gic-v5-iwb.c
+++ b/drivers/irqchip/irq-gic-v5-iwb.c
@@ -241,7 +241,6 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev)
 	struct gicv5_iwb_chip_data *iwb_node;
 	void __iomem *iwb_base;
 	struct resource *res;
-	int ret;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res)
@@ -254,16 +253,10 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev)
 	}
 
 	iwb_node = gicv5_iwb_init_bases(iwb_base, pdev);
-	if (IS_ERR(iwb_node)) {
-		ret = PTR_ERR(iwb_node);
-		goto out_unmap;
-	}
+	if (IS_ERR(iwb_node))
+		return PTR_ERR(iwb_node);
 
 	return 0;
-
-out_unmap:
-	iounmap(iwb_base);
-	return ret;
 }
 
 static const struct of_device_id gicv5_iwb_of_match[] = {

  parent reply	other threads:[~2025-08-05  8:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01  7:58 [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
2025-08-01  7:58 ` [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path Lorenzo Pieralisi
2025-08-01 12:26   ` Marc Zyngier
2025-08-05  8:48   ` tip-bot2 for Lorenzo Pieralisi [this message]
2025-08-01  7:58 ` [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate Lorenzo Pieralisi
2025-08-01 12:24   ` Marc Zyngier
2025-08-01 14:04     ` Lorenzo Pieralisi
2025-08-01  7:58 ` [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs Lorenzo Pieralisi
2025-08-01 12:30   ` Marc Zyngier
2025-08-01 14:01     ` Lorenzo Pieralisi
2025-08-05  8:48   ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
2025-08-05  9:30 ` [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=175438371006.1420.11472579450134368633.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lpieralisi@kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®