Skip to content

Commit

Permalink
net: dsa: ar9331: remove unnecessary dev_set_drvdata()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Yang Yingliang authored and Jakub Kicinski committed Sep 23, 2022
1 parent f66d1ec commit 14b29ec
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/dsa/qca/ar9331.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,8 +1099,6 @@ static void ar9331_sw_remove(struct mdio_device *mdiodev)
dsa_unregister_switch(&priv->ds);

reset_control_assert(priv->sw_reset);

dev_set_drvdata(&mdiodev->dev, NULL);
}

static void ar9331_sw_shutdown(struct mdio_device *mdiodev)
Expand Down

0 comments on commit 14b29ec

Please sign in to comment.