Patch "gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpio-mpc8xxx-fix-a-resources-leak-in-the-error-handl.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 15a634e82ee944e24378c76961a7a3a0c78c48ca
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Fri Aug 20 17:37:55 2021 +0200

    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@xxxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux