aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/octeon-usb.c
diff options
context:
space:
mode:
authorYe Guojin <ye.guojin@zte.com.cn>2021-11-16 08:10:51 +0000
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-12-16 15:57:57 +0100
commit858779df1c0787d3fec827fb705708df9ebdb15b (patch)
tree6a33bd1d946f99a26ab19b37ecfcf0fea3e8a278 /arch/mips/cavium-octeon/octeon-usb.c
parentMIPS: BCM47XX: Replace strlcpy with strscpy (diff)
downloadlinux-dev-858779df1c0787d3fec827fb705708df9ebdb15b.tar.xz
linux-dev-858779df1c0787d3fec827fb705708df9ebdb15b.zip
MIPS: OCTEON: add put_device() after of_find_device_by_node()
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@zte.com.cn> Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/cavium-octeon/octeon-usb.c')
-rw-r--r--arch/mips/cavium-octeon/octeon-usb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c
index 6e4d3619137a..4df919d26b08 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);