From: Christophe JAILLET christophe.jaillet@wanadoo.fr
stable inclusion from stable-5.10.68 commit f86956143da9a32f5f7c5cef248563c65dbee47c bugzilla: 182671 https://gitee.com/openeuler/kernel/issues/I4EWUH
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=...
--------------------------------
[ Upstream commit 555bda42b0c1a5ffb72d3227c043e8afde778f1f ]
Commit 698b8eeaed72 ("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: 698b8eeaed72 ("gpio/mpc8xxx: change irq handler from chained to normal") Signed-off-by: Christophe JAILLET christophe.jaillet@wanadoo.fr Signed-off-by: Bartosz Golaszewski bgolaszewski@baylibre.com Signed-off-by: Sasha Levin sashal@kernel.org Signed-off-by: Chen Jun chenjun102@huawei.com Acked-by: Weilong Chen chenweilong@huawei.com
Signed-off-by: Chen Jun chenjun102@huawei.com --- drivers/gpio/gpio-mpc8xxx.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 3c2fa44d9279..5b2a919a6644 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -406,6 +406,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; }