Skip to content

Commit

Permalink
irqchip: renesas-irqc: Fix irqc_probe error handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Simon Horman committed Jun 6, 2013
1 parent c778879 commit dfaf820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-renesas-irqc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dfaf820

Please sign in to comment.