提交 85a5965e 编写于 作者: T Takeshi Yoshimura 提交者: Sebastian Reichel

wm831x_power: Fix off-by-one at free_irq()

An error handling in wm831x_power_probe() mistakenly frees a failed-to-
request irq as well as other irqs. I added missing decrement of the loop
counter.
Signed-off-by: NTakeshi Yoshimura <yos@sslab.ics.keio.ac.jp>
Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 3d7f1800
......@@ -609,6 +609,7 @@ static int wm831x_power_probe(struct platform_device *pdev)
return ret;
err_bat_irq:
--i;
for (; i >= 0; i--) {
irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]);
free_irq(irq, power);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册