]> git.baikalelectronics.ru Git - kernel.git/commit
mdio: mux: fix device_node_continue.cocci warnings
authorJulia Lawall <julia.lawall@lip6.fr>
Fri, 12 May 2017 14:54:23 +0000 (22:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 May 2017 18:28:10 +0000 (14:28 -0400)
commitfffa1b5dcd8cf2612ff375222ac76b8f9812d9e3
treefec16c48b8a7b82c8147c90b1a9e240e1ea907e5
parentda62dec836b46501dd39fcc69c3600b419c19b09
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>
drivers/net/phy/mdio-mux.c