summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-renesas-irqc.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-05-06 11:03:32 +0200
committerSimon Horman <horms+renesas@verge.net.au>2013-06-06 03:23:58 +0200
commitdfaf820a13ec160f06556e08dab423818ba87f14 (patch)
tree76988415570371b12820c682ccc1b8094e5b97c6 /drivers/irqchip/irq-renesas-irqc.c
parentLinux 3.10-rc2 (diff)
downloadlinux-dfaf820a13ec160f06556e08dab423818ba87f14.tar.xz
linux-dfaf820a13ec160f06556e08dab423818ba87f14.zip
irqchip: renesas-irqc: Fix irqc_probe error handling
The code in goto err3 path is wrong because it will call fee_irq() with k == 0, which means it does free_irq(p->irq[-1].requested_irq, &p->irq[-1]); Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/irqchip/irq-renesas-irqc.c')
-rw-r--r--drivers/irqchip/irq-renesas-irqc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 927bff373aac..2f404ba61c6c 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -248,8 +248,8 @@ static int irqc_probe(struct platform_device *pdev)
return 0;
err3:
- for (; k >= 0; k--)
- free_irq(p->irq[k - 1].requested_irq, &p->irq[k - 1]);
+ while (--k >= 0)
+ free_irq(p->irq[k].requested_irq, &p->irq[k]);
irq_domain_remove(p->irq_domain);
err2: