Re: [PATCH] net: macb: NULL out phydev after removing mdio bus

From: Moritz Fischer
Date: Fri Oct 07 2016 - 11:41:07 EST

On Fri, Oct 7, 2016 at 8:13 AM, Xander Huff <xander.huff@xxxxxx> wrote:
> From: Nathan Sullivan <nathan.sullivan@xxxxxx>
> To ensure the dev->phydev pointer is not used after becoming invalid in
> mdiobus_unregister, set it to NULL. This happens when removing the macb
> driver without first taking its interface down, since unregister_netdev
> will end up calling macb_close.
> Signed-off-by: Xander Huff <xander.huff@xxxxxx>
> Signed-off-by: Nathan Sullivan <nathan.sullivan@xxxxxx>
> Signed-off-by: Brad Mouring <brad.mouring@xxxxxx>
Reviewed-by: Moritz Fischer <moritz.fischer@xxxxxxxxx>