]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/net/phy/mdio_bus.c: call put_device on device_register() failure
authorLevente Kurusa <levex@linux.com>
Thu, 30 Jan 2014 23:45:46 +0000 (15:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jan 2014 00:56:54 +0000 (16:56 -0800)
commit8b173297c2f933186fa26e53b79446b4dd2633e2
tree8ecdf75687efe387fd47feec6df5b88b5cc48bc0
parentfbd27328e9909e116a52e4234faa8b2d5b09b56b
drivers/net/phy/mdio_bus.c: call put_device on device_register() failure

It is required to call put_device() if device_register() fails, so that
we give up the last reference to the device.  Calling put_device allows
for mdiobus_release to be executed, kfreeing the bus.

Signed-off-by: Levente Kurusa <levex@linux.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: David Daney <david.daney@cavium.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/phy/mdio_bus.c