提交 555bda42 编写于 作者: C Christophe JAILLET 提交者: Bartosz Golaszewski

gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'

Commit 698b8eea ("gpio/mpc8xxx: change irq handler from chained to normal")
has introduced a new 'goto err;' at the very end of the function, but has
not updated the error handling path accordingly.

Add the now missing 'irq_domain_remove()' call which balances a previous
'irq_domain_create_linear() call.

Fixes: 698b8eea ("gpio/mpc8xxx: change irq handler from chained to normal")
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
上级 6b4a2a42
......@@ -416,6 +416,8 @@ static int mpc8xxx_probe(struct platform_device *pdev)
return 0;
err:
if (mpc8xxx_gc->irq)
irq_domain_remove(mpc8xxx_gc->irq);
iounmap(mpc8xxx_gc->regs);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册