Skip to content

Commit 8c977f5

Browse files
JuliaLawalldavem330
authored andcommitted
mdio: mux: fix device_node_continue.cocci warnings
Device node iterators put the previous value of the index variable, so an explicit put causes a double put. In particular, of_mdiobus_register can fail before doing anything interesting, so one could view it as a no-op from the reference count point of view. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci CC: Jon Mason <[email protected]> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d19b183 commit 8c977f5

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/net/phy/mdio-mux.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ int mdio_mux_init(struct device *dev,
169169
if (r) {
170170
mdiobus_free(cb->mii_bus);
171171
devm_kfree(dev, cb);
172-
of_node_put(child_bus_node);
173172
} else {
174173
cb->next = pb->children;
175174
pb->children = cb;

0 commit comments

Comments
 (0)