Message ID | 20220921140524.3831101-19-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 24aeeb107f0724fa15e16d5f28b39f3c3ecfc746 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: remove unnecessary set_drvdata() | expand |
diff --git a/drivers/net/dsa/xrs700x/xrs700x_mdio.c b/drivers/net/dsa/xrs700x/xrs700x_mdio.c index 127a677d1f39..5f7d344b5d73 100644 --- a/drivers/net/dsa/xrs700x/xrs700x_mdio.c +++ b/drivers/net/dsa/xrs700x/xrs700x_mdio.c @@ -140,8 +140,6 @@ static void xrs700x_mdio_remove(struct mdio_device *mdiodev) return; xrs700x_switch_remove(priv); - - dev_set_drvdata(&mdiodev->dev, NULL); } static void xrs700x_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/xrs700x/xrs700x_mdio.c | 2 -- 1 file changed, 2 deletions(-)