From: Yang Yingliang Date: Wed, 21 Sep 2022 14:05:14 +0000 (+0800) Subject: net: dsa: mt7530: remove unnecessary dev_set_drvdata() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ebe48922c0c45bcedd407d0fe546464694061af7;p=linux.git net: dsa: mt7530: remove unnecessary dev_set_drvdata() 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 Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 835807911be01..a6cb5b0406fe0 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -3300,8 +3300,6 @@ mt7530_remove(struct mdio_device *mdiodev) dsa_unregister_switch(priv->ds); mutex_destroy(&priv->reg_mutex); - - dev_set_drvdata(&mdiodev->dev, NULL); } static void mt7530_shutdown(struct mdio_device *mdiodev)