Skip to content

Commit

Permalink
net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata()
Browse files Browse the repository at this point in the history
Remove unnecessary set_drvdata(NULL) function 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: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Yang Yingliang authored and Jakub Kicinski committed Sep 23, 2022
1 parent ee08bf0 commit 774b060
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/net/dsa/vitesse-vsc73xx-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ static int vsc73xx_platform_remove(struct platform_device *pdev)

vsc73xx_remove(&vsc_platform->vsc);

platform_set_drvdata(pdev, NULL);

return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/net/dsa/vitesse-vsc73xx-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ static void vsc73xx_spi_remove(struct spi_device *spi)
return;

vsc73xx_remove(&vsc_spi->vsc);

spi_set_drvdata(spi, NULL);
}

static void vsc73xx_spi_shutdown(struct spi_device *spi)
Expand Down

0 comments on commit 774b060

Please sign in to comment.