Skip to content

Commit

Permalink
irqchip/irq-alpine-msi: Release the correct domain on error
Browse files Browse the repository at this point in the history
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: e6b78f2 ('irqchip: Add the Alpine MSIX interrupt controller')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: kernel-janitors@vger.kernel.org
Cc: Tsahee Zidenberg <tsahee@annapurnalabs.com>
Link: http://lkml.kernel.org/r/20160311081442.GE31887@mwanda
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Dan Carpenter authored and Thomas Gleixner committed Mar 11, 2016
1 parent edf8fcd commit 143d36a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-alpine-msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 143d36a

Please sign in to comment.