diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-08-20 17:37:55 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-22 12:39:30 +0200 |
| commit | 8c7ba0ec7c45bd07337e62207865215545fb360a (patch) | |
| tree | 3ae1be7e34becd4bc7d5a214f625263013f855a7 | |
| parent | 17bf84a9e8a2042081a6a783dece158668e78d36 (diff) | |
| download | linux-8c7ba0ec7c45bd07337e62207865215545fb360a.tar.gz linux-8c7ba0ec7c45bd07337e62207865215545fb360a.tar.bz2 linux-8c7ba0ec7c45bd07337e62207865215545fb360a.zip | |
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>
| -rw-r--r-- | drivers/gpio/gpio-mpc8xxx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 50b321a1ab1b..9acfa25ad6ee 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -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; } |
