CC: kbuild-...@lists.01.org CC: linux-ker...@vger.kernel.org TO: Sumera Priyadarsini <sylphrena...@gmail.com> CC: Julia Lawall <julia.law...@lip6.fr> CC: Kishon Vijay Abraham I <kis...@ti.com> CC: Vinod Koul <vk...@kernel.org> CC: Heiko Stuebner <he...@sntech.de> CC: linux-ker...@vger.kernel.org CC: linux-arm-ker...@lists.infradead.org CC: linux-rockc...@lists.infradead.org
From: kernel test robot <l...@intel.com> drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1149:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before break around line 1184. Semantic patch information: False positives can be due to function calls within the for_each loop that may encapsulate an of_node_put. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script") CC: Sumera Priyadarsini <sylphrena...@gmail.com> Reported-by: kernel test robot <l...@intel.com> Signed-off-by: kernel test robot <l...@intel.com> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 commit: 82c2d81361ecd142a54e84a9da1e287113314a4f coccinelle: iterators: Add for_each_child.cocci script :::::: branch date: 20 hours ago :::::: commit date: 8 months ago Please take the patch only if it's a positive warning. Thanks! phy-rockchip-inno-usb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- 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 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); _______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org