提交 858779df 编写于 作者: Y Ye Guojin 提交者: Thomas Bogendoerfer

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: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NYe Guojin <ye.guojin@zte.com.cn>
Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
上级 906c6bc6
...@@ -328,6 +328,7 @@ static int __init octeon_ehci_device_init(void) ...@@ -328,6 +328,7 @@ static int __init octeon_ehci_device_init(void)
pd->dev.platform_data = &octeon_ehci_pdata; pd->dev.platform_data = &octeon_ehci_pdata;
octeon_ehci_hw_start(&pd->dev); octeon_ehci_hw_start(&pd->dev);
put_device(&pd->dev);
return ret; return ret;
} }
...@@ -391,6 +392,7 @@ static int __init octeon_ohci_device_init(void) ...@@ -391,6 +392,7 @@ static int __init octeon_ohci_device_init(void)
pd->dev.platform_data = &octeon_ohci_pdata; pd->dev.platform_data = &octeon_ohci_pdata;
octeon_ohci_hw_start(&pd->dev); octeon_ohci_hw_start(&pd->dev);
put_device(&pd->dev);
return ret; return ret;
} }
......
...@@ -537,6 +537,7 @@ static int __init dwc3_octeon_device_init(void) ...@@ -537,6 +537,7 @@ static int __init dwc3_octeon_device_init(void)
devm_iounmap(&pdev->dev, base); devm_iounmap(&pdev->dev, base);
devm_release_mem_region(&pdev->dev, res->start, devm_release_mem_region(&pdev->dev, res->start,
resource_size(res)); resource_size(res));
put_device(&pdev->dev);
} }
} while (node != NULL); } while (node != NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册