drm/sprd: fix for_each_child.cocci warnings
Subsystems (3)
PATCH 1/1 drm/sprd: fix for_each_child.cocci warnings
From: kernel test robot <[email protected]>
for_each_child_of_node should have of_node_put() before return.
Generated by: scripts/coccinelle/iterators/for_each_child.cocci
CC Kevin Tang <[email protected]>
Reported-by kernel test robot <[email protected]>
Signed-off-by kernel test robot <[email protected]>
Signed-off-by Julia Lawall <[email protected]>
---
url: https://github.com/0day-ci/linux/commits/Kevin-Tang/Add-Unisoc-s-drm-kms-module/20210425-203751 base: e3d35712f85ac84fb06234848f6c043ab418cf8b
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
Please take the patch only if it's a positive warning. Thanks!
sprd_dsi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/sprd/sprd_dsi.c +2 -0
@@ -788,6 +788,7 @@ static int sprd_dsi_find_panel(struct sp panel =of_drm_find_panel (child);if (!IS_ERR (panel)) { dsi->panel = panel; +of_node_put (child);return 0 ; } }
@@ -800,6 +801,7 @@ static int sprd_dsi_find_panel(struct sp panel =of_drm_find_panel (child);if (!IS_ERR (panel)) { dsi->panel = panel; +of_node_put (child);return 0 ; } }