Message ID | 20220921140524.3831101-5-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8668cfc6db48aafed0cc9cd2f770dea246e02f52 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: remove unnecessary set_drvdata() | expand |
On Wed Sep 21 2022, Yang Yingliang wrote: > Remove unnecessary platform_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: Kurt Kanzenbach <kurt@linutronix.de>
diff --git a/drivers/net/dsa/hirschmann/hellcreek.c b/drivers/net/dsa/hirschmann/hellcreek.c index ea8bbfce0f1f..eac6ace7c5f9 100644 --- a/drivers/net/dsa/hirschmann/hellcreek.c +++ b/drivers/net/dsa/hirschmann/hellcreek.c @@ -1996,7 +1996,6 @@ static int hellcreek_remove(struct platform_device *pdev) hellcreek_hwtstamp_free(hellcreek); hellcreek_ptp_free(hellcreek); dsa_unregister_switch(hellcreek->ds); - platform_set_drvdata(pdev, NULL); return 0; }
Remove unnecessary platform_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/hirschmann/hellcreek.c | 1 - 1 file changed, 1 deletion(-)