diff options
author | Julia Lawall <julia.lawall@lip6.fr> | 2017-05-12 16:54:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-15 20:28:10 +0200 |
commit | 8c977f5a856a7276450ddf3a7b57b4a8815b63f9 (patch) | |
tree | fec16c48b8a7b82c8147c90b1a9e240e1ea907e5 | |
parent | net/packet: fix missing net_device reference release (diff) | |
download | linux-8c977f5a856a7276450ddf3a7b57b4a8815b63f9.tar.xz linux-8c977f5a856a7276450ddf3a7b57b4a8815b63f9.zip |
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 <jon.mason@broadcom.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/mdio-mux.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 6943c5ece44a..599ce24c514f 100644 --- a/drivers/net/phy/mdio-mux.c +++ b/drivers/net/phy/mdio-mux.c @@ -169,7 +169,6 @@ int mdio_mux_init(struct device *dev, if (r) { mdiobus_free(cb->mii_bus); devm_kfree(dev, cb); - of_node_put(child_bus_node); } else { cb->next = pb->children; pb->children = cb; |