Message ID | 20220921140524.3831101-6-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2697085007f0dd2a1c0e31375934d302ff68bca2 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: remove unnecessary set_drvdata() | expand |
diff --git a/drivers/net/dsa/lan9303_mdio.c b/drivers/net/dsa/lan9303_mdio.c index d12c55fdc811..4f33369a2de5 100644 --- a/drivers/net/dsa/lan9303_mdio.c +++ b/drivers/net/dsa/lan9303_mdio.c @@ -138,8 +138,6 @@ static void lan9303_mdio_remove(struct mdio_device *mdiodev) return; lan9303_remove(&sw_dev->chip); - - dev_set_drvdata(&mdiodev->dev, NULL); } static void lan9303_mdio_shutdown(struct mdio_device *mdiodev)
Remove unnecessary dev_set_drvdata() in ->remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove(). Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/net/dsa/lan9303_mdio.c | 2 -- 1 file changed, 2 deletions(-)