public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] irqchip: irq-alpine-msi: releasing the wrong variable on error
@ 2016-03-11  8:14 Dan Carpenter
  2016-03-11  9:12 ` [tip:irq/core] irqchip/irq-alpine-msi: Release the correct domain " tip-bot for Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-03-11  8:14 UTC (permalink / raw)
  To: Tsahee Zidenberg, Antoine Tenart
  Cc: Thomas Gleixner, Jason Cooper, Marc Zyngier, linux-kernel,
	kernel-janitors

The "msi_domain" variable is NULL here so it leads to a NULL
dereference.  It looks like we actually intended to free
"middle_domain".

Fixes: e6b78f2c3e14 ('irqchip: Add the Alpine MSIX interrupt controller')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index f871272..2538425 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -220,7 +220,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv,
 					       middle_domain);
 	if (!msi_domain) {
 		pr_err("Failed to create MSI domain\n");
-		irq_domain_remove(msi_domain);
+		irq_domain_remove(middle_domain);
 		return -ENOMEM;
 	}
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-11  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-11  8:14 [patch] irqchip: irq-alpine-msi: releasing the wrong variable on error Dan Carpenter
2016-03-11  9:12 ` [tip:irq/core] irqchip/irq-alpine-msi: Release the correct domain " tip-bot for Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox