Patch "usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()" has been added to the 5.15-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

    usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()

to the 5.15-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:
     usb-phy-phy-tahvo-fix-memory-leak-in-tahvo_usb_probe.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 9eb79adacb6373a150cab31148f3dc1c561c9e57
Author: Li Yang <lidaxian@xxxxxxxxxxx>
Date:   Thu Apr 20 22:08:31 2023 +0800

    usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
    
    [ Upstream commit 342161c11403ea00e9febc16baab1d883d589d04 ]
    
    Smatch reports:
    drivers/usb/phy/phy-tahvo.c: tahvo_usb_probe()
    warn: missing unwind goto?
    
    After geting irq, if ret < 0, it will return without error handling to
    free memory.
    Just add error handling to fix this problem.
    
    Fixes: 0d45a1373e66 ("usb: phy: tahvo: add IRQ check")
    Signed-off-by: Li Yang <lidaxian@xxxxxxxxxxx>
    Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230420140832.9110-1-lidaxian@xxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
index a3e043e3e4aae..d0672b6712985 100644
--- a/drivers/usb/phy/phy-tahvo.c
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -395,7 +395,7 @@ static int tahvo_usb_probe(struct platform_device *pdev)
 
 	tu->irq = ret = platform_get_irq(pdev, 0);
 	if (ret < 0)
-		return ret;
+		goto err_remove_phy;
 	ret = request_threaded_irq(tu->irq, NULL, tahvo_usb_vbus_interrupt,
 				   IRQF_ONESHOT,
 				   "tahvo-vbus", tu);



[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