From: Dan Carpenter Date: Fri, 11 Mar 2016 08:14:43 +0000 (+0300) Subject: irqchip/irq-alpine-msi: Release the correct domain on error X-Git-Tag: MMI-PSA29.97-13-9~8358^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=143d36a33b4d59a56bb8e913a17a105578fd3237;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git irqchip/irq-alpine-msi: Release the correct domain on error 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 Cc: Jason Cooper Cc: Marc Zyngier Cc: Antoine Tenart Cc: kernel-janitors@vger.kernel.org Cc: Tsahee Zidenberg Link: http://lkml.kernel.org/r/20160311081442.GE31887@mwanda Signed-off-by: Thomas Gleixner --- diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c index f8712722a606..25384255b30f 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; }