Skip to content

Commit

Permalink
net: dsa: sja1105: remove unnecessary spi_set_drvdata()
Browse files Browse the repository at this point in the history
Remove unnecessary spi_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 4f6ee77 commit ee08bf0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/dsa/sja1105/sja1105_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3351,8 +3351,6 @@ static void sja1105_remove(struct spi_device *spi)
return;

dsa_unregister_switch(priv->ds);

spi_set_drvdata(spi, NULL);
}

static void sja1105_shutdown(struct spi_device *spi)
Expand Down

0 comments on commit ee08bf0

Please sign in to comment.