2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00

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

Commit 698b8eeaed ("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: 698b8eeaed ("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>
This commit is contained in:
Christophe JAILLET 2021-08-20 17:37:55 +02:00 committed by Bartosz Golaszewski
parent 6b4a2a4272
commit 555bda42b0

View File

@ -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;
}