]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drivers/net/phy/mdio_bus.c: call put_device on device_register() failure
authorLevente Kurusa <levex@linux.com>
Wed, 15 Jan 2014 05:56:08 +0000 (16:56 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Jan 2014 05:54:01 +0000 (16:54 +1100)
commit87d71ff8ab20647a8e67a061c8b70a044109be21
tree87834667d40726f76f34b0e8f8d5294fdc09e0a9
parenta0ac6d8e17587dea87091aee13abd47d1777e035
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>
drivers/net/phy/mdio_bus.c