Re: [PATCH 1/4] net: phy: call put_device on device_register()failure

From: Greg Kroah-Hartman
Date: Sat Dec 14 2013 - 14:27:10 EST


On Fri, Dec 13, 2013 at 07:39:53PM +0100, Levente Kurusa wrote:
> 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.
>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
> Signed-off-by: Levente Kurusa <levex@xxxxxxxxx>

Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/