Skip to content

Commit e73d1ab

Browse files
JuliaLawalldavem330
authored andcommitted
net: bcmasp: add missing of_node_put
for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. This was done using the Coccinelle semantic patch iterators/for_each_child.cocci Signed-off-by: Julia Lawall <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ced33ca commit e73d1ab

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/broadcom/asp2

1 file changed

+1
-0
lines changed

drivers/net/ethernet/broadcom/asp2/bcmasp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,7 @@ static int bcmasp_probe(struct platform_device *pdev)
13001300
if (!intf) {
13011301
dev_err(dev, "Cannot create eth interface %d\n", i);
13021302
bcmasp_remove_intfs(priv);
1303+
of_node_put(intf_node);
13031304
goto of_put_exit;
13041305
}
13051306
list_add_tail(&intf->list, &priv->intfs);

0 commit comments

Comments
 (0)