From: Axel Lin <axel.lin@ingics.com>
To: Simon Horman <horms+renesas@verge.net.au>
Cc: Magnus Damm <damm@opensource.se>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH] irqchip: renesas-irqc: Fix irqc_probe error handling
Date: Mon, 06 May 2013 17:03:32 +0800 [thread overview]
Message-ID: <1367831012.3547.2.camel@phoenix> (raw)
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>
---
drivers/irqchip/irq-renesas-irqc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 649cd69..3651f77 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -252,8 +252,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:
--
1.8.1.2
next reply other threads:[~2013-05-06 9:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 9:03 Axel Lin [this message]
2013-05-08 0:57 ` [PATCH] irqchip: renesas-irqc: Fix irqc_probe error handling Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367831012.3547.2.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=damm@opensource.se \
--cc=g.liakhovetski@gmx.de \
--cc=horms+renesas@verge.net.au \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox