]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: NULL out phydev after removing mdio bus
authorNathan Sullivan <nathan.sullivan@ni.com>
Fri, 7 Oct 2016 15:13:22 +0000 (10:13 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Oct 2016 03:55:59 +0000 (23:55 -0400)
commitaf7a868a8b55e07ae27ef4e8e3f8275da2d386b0
tree4ff4790b98de09d7a43ecaf26a00d64464b1c0d0
parenta266bde9d347d567e0d682882c006b07bc01bb1e
net: macb: NULL out phydev after removing mdio bus

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@ni.com>
Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c