mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 07:22:34 +00:00
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 <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Grant Likely <[email protected]> Cc: David Daney <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>