summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/dsa_loop.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-09-21 17:05:09 +0300
committerJakub Kicinski <kuba@kernel.org>2022-09-23 05:30:35 +0300
commitc1816b20141597071c67a69e8fb8d31f1b9adfad (patch)
treeb1eeaf321ef5a927ab9ba529fcf114f302486927 /drivers/net/dsa/dsa_loop.c
parent47f6aa145036b57186f1eae35d0eebb2bf3fd6b7 (diff)
downloadlinux-c1816b20141597071c67a69e8fb8d31f1b9adfad.tar.xz
net: dsa: loop: 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 <yangyingliang@huawei.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
-rw-r--r--drivers/net/dsa/dsa_loop.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c
index 263e41191c29..b9107fe40023 100644
--- a/drivers/net/dsa/dsa_loop.c
+++ b/drivers/net/dsa/dsa_loop.c
@@ -351,8 +351,6 @@ static void dsa_loop_drv_remove(struct mdio_device *mdiodev)
dsa_unregister_switch(ds);
dev_put(ps->netdev);
-
- dev_set_drvdata(&mdiodev->dev, NULL);
}
static void dsa_loop_drv_shutdown(struct mdio_device *mdiodev)