diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-05-06 05:03:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-15 18:28:45 -0500 |
commit | b212be3528e64ff306f7477628cc042e448742c5 (patch) | |
tree | 63ecbc830bc23fedafd513066e83c2093253c53b | |
parent | 8b4ed85b8404ffe7e10ee410c4df3968b86f0793 (diff) |
irqchip: renesas-irqc: Fix irqc_probe error handling
commit dfaf820a13ec160f06556e08dab423818ba87f14 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/irqchip/irq-renesas-irqc.c | 4 |
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) | |||
248 | 248 | ||
249 | return 0; | 249 | return 0; |
250 | err3: | 250 | err3: |
251 | for (; k >= 0; k--) | 251 | while (--k >= 0) |
252 | free_irq(p->irq[k - 1].requested_irq, &p->irq[k - 1]); | 252 | free_irq(p->irq[k].requested_irq, &p->irq[k]); |
253 | 253 | ||
254 | irq_domain_remove(p->irq_domain); | 254 | irq_domain_remove(p->irq_domain); |
255 | err2: | 255 | err2: |