summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/via-sdmmc.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-08 20:15:13 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2023-08-09 15:44:17 +0200
commit283cf357b02848a48eb544e3cde993254fc2c19e (patch)
tree3515a81455cf4a5d6c81641fa70b0dc90647e3ef /drivers/mmc/host/via-sdmmc.c
parent117d73b18441638b85b3963256c846509c6138f1 (diff)
mmc: remove unnecessary set_drvdata() function
The driver data will be cleared in device_unbind_cleanup() in driver core code. So the set_drvdata(..., NULL) called in remove and error path in probe can be removed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230808121513.553143-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/via-sdmmc.c')
-rw-r--r--drivers/mmc/host/via-sdmmc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mmc/host/via-sdmmc.c b/drivers/mmc/host/via-sdmmc.c
index a2b0d9461665..ba6044b16e07 100644
--- a/drivers/mmc/host/via-sdmmc.c
+++ b/drivers/mmc/host/via-sdmmc.c
@@ -1160,7 +1160,6 @@ static int via_sd_probe(struct pci_dev *pcidev,
unmap:
iounmap(sdhost->mmiobase);
free_mmc_host:
- dev_set_drvdata(&pcidev->dev, NULL);
mmc_free_host(mmc);
release:
pci_release_regions(pcidev);
@@ -1212,7 +1211,6 @@ static void via_sd_remove(struct pci_dev *pcidev)
writeb(gatt, sdhost->pcictrl_mmiobase + VIA_CRDR_PCICLKGATT);
iounmap(sdhost->mmiobase);
- dev_set_drvdata(&pcidev->dev, NULL);
mmc_free_host(sdhost->mmc);
pci_release_regions(pcidev);
pci_disable_device(pcidev);