summaryrefslogtreecommitdiff
path: root/drivers/phy/rockchip
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-06-23 16:23:30 +0200
committerVinod Koul <vkoul@kernel.org>2021-08-06 16:52:29 +0530
commit1716e49eb8b4478e8952ce9206f1974c3e842e1f (patch)
treeee5b45df2c3c12418085fe7ff104f584f5554bb6 /drivers/phy/rockchip
parentc1302e8ce517ed9c417aa4eb19776df4efbbebf4 (diff)
phy: rockchip-inno-usb2: fix for_each_child.cocci warnings
For_each_available_child_of_node should have of_node_put() before break around line 1184. The other jumps out of the loop do contain the put. Generated by: scripts/coccinelle/iterators/for_each_child.cocci CC: Sumera Priyadarsini <sylphrenadin@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2106231617540.99238@hadrien Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/rockchip')
-rw-r--r--drivers/phy/rockchip/phy-rockchip-inno-usb2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index beacac1dd253..4f569d9307b9 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -1180,8 +1180,10 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)
next_child:
/* to prevent out of boundary */
- if (++index >= rphy->phy_cfg->num_ports)
+ if (++index >= rphy->phy_cfg->num_ports) {
+ of_node_put(child_np);
break;
+ }
}
provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);