gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 20 Aug 2021 15:37:55 +0000 (17:37 +0200)
committerDom Cobley <popcornmix@gmail.com>
Thu, 14 Oct 2021 11:32:59 +0000 (12:32 +0100)
commit1e98b8b78fdfe85cb51bdeed9bb2daccb85ab2d5
tree382b1ff53bb623be2df0797abd833b9b3ef755c0
parent414b4566e74d5d5875d0b0f016df31e28183f9f3
gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'

[ 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>
drivers/gpio/gpio-mpc8xxx.c