Message ID | 20220921140524.3831101-3-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 47f6aa145036b57186f1eae35d0eebb2bf3fd6b7 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: remove unnecessary set_drvdata() | expand |
On 9/21/22 07:05, 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> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 6507663f35e5..cde253d27bd0 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -1551,8 +1551,6 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev) if (priv->type == BCM7278_DEVICE_ID) reset_control_assert(priv->rcdev); - 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/bcm_sf2.c | 2 -- 1 file changed, 2 deletions(-)