Skip to content

Commit f26fde3

Browse files
Yang Livinodkoul
authored andcommitted
phy: ti: j721e-wiz: add missing call to of_node_put()
In one of the error paths of the for_each_child_of_node() loop in of_property_read_u32, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/phy/ti/phy-j721e-wiz.c:786:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 795. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/1614244674-66556-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 982313c commit f26fde3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/phy/ti/phy-j721e-wiz.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz)
11041104

11051105
ret = of_property_read_u32(subnode, "reg", &reg);
11061106
if (ret) {
1107+
of_node_put(subnode);
11071108
dev_err(dev,
11081109
"%s: Reading \"reg\" from \"%s\" failed: %d\n",
11091110
__func__, subnode->name, ret);

0 commit comments

Comments
 (0)