Message ID | 20220921140524.3831101-14-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 68c4e297e09c3b3e2012ea54e5329d03d653c977 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: remove unnecessary set_drvdata() | expand |
diff --git a/drivers/net/dsa/qca/qca8k-8xxx.c b/drivers/net/dsa/qca/qca8k-8xxx.c index c181346388a4..5669c92c93f7 100644 --- a/drivers/net/dsa/qca/qca8k-8xxx.c +++ b/drivers/net/dsa/qca/qca8k-8xxx.c @@ -1957,8 +1957,6 @@ qca8k_sw_remove(struct mdio_device *mdiodev) qca8k_port_set_status(priv, i, 0); dsa_unregister_switch(priv->ds); - - dev_set_drvdata(&mdiodev->dev, NULL); } static void qca8k_sw_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/qca/qca8k-8xxx.c | 2 -- 1 file changed, 2 deletions(-)