Patch "MIPS: OCTEON: add put_device() after of_find_device_by_node()" 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

    MIPS: OCTEON: add put_device() after of_find_device_by_node()

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:
     mips-octeon-add-put_device-after-of_find_device_by_n.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 4f3e2ece0aaa3e2e0f62075c8d88005a9f2ef318
Author: Ye Guojin <ye.guojin@xxxxxxxxxx>
Date:   Tue Nov 16 08:10:51 2021 +0000

    MIPS: OCTEON: add put_device() after of_find_device_by_node()
    
    [ Upstream commit 858779df1c0787d3fec827fb705708df9ebdb15b ]
    
    This was found by coccicheck:
    ./arch/mips/cavium-octeon/octeon-platform.c, 332, 1-7, ERROR missing
    put_device; call of_find_device_by_node on line 324, but without a
    corresponding object release within this function.
    ./arch/mips/cavium-octeon/octeon-platform.c, 395, 1-7, ERROR missing
    put_device; call of_find_device_by_node on line 387, but without a
    corresponding object release within this function.
    ./arch/mips/cavium-octeon/octeon-usb.c, 512, 3-9, ERROR missing
    put_device; call of_find_device_by_node on line 515, but without a
    corresponding object release within this function.
    ./arch/mips/cavium-octeon/octeon-usb.c, 543, 1-7, ERROR missing
    put_device; call of_find_device_by_node on line 515, but without a
    corresponding object release within this function.
    
    Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
    Signed-off-by: Ye Guojin <ye.guojin@xxxxxxxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index d56e9b9d2e434..a994022e32c9f 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -328,6 +328,7 @@ static int __init octeon_ehci_device_init(void)
 
 	pd->dev.platform_data = &octeon_ehci_pdata;
 	octeon_ehci_hw_start(&pd->dev);
+	put_device(&pd->dev);
 
 	return ret;
 }
@@ -391,6 +392,7 @@ static int __init octeon_ohci_device_init(void)
 
 	pd->dev.platform_data = &octeon_ohci_pdata;
 	octeon_ohci_hw_start(&pd->dev);
+	put_device(&pd->dev);
 
 	return ret;
 }
diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c
index 6e4d3619137af..4df919d26b082 100644
--- a/arch/mips/cavium-octeon/octeon-usb.c
+++ b/arch/mips/cavium-octeon/octeon-usb.c
@@ -537,6 +537,7 @@ static int __init dwc3_octeon_device_init(void)
 			devm_iounmap(&pdev->dev, base);
 			devm_release_mem_region(&pdev->dev, res->start,
 						resource_size(res));
+			put_device(&pdev->dev);
 		}
 	} while (node != NULL);
 



[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