diff options
| author | Ulf Hansson <ulf.hansson@oss.qualcomm.com> | 2026-09-28 17:50:57 +0200 |
|---|---|---|
| committer | Ulf Hansson <ulfh@kernel.org> | 2026-09-28 17:54:09 +0200 |
| commit | 59f97e4fe6b6d912c5db150ea9ae3a9ca466da91 (patch) | |
| tree | 9a7d88c9a7b3e5158f6d67530638c19a31c01657 /drivers/mmc/host | |
| parent | c98cbf6ce8b9f9f535600b15a5f34a77982b226b (diff) | |
| download | linux-next-59f97e4fe6b6d912c5db150ea9ae3a9ca466da91.tar.gz linux-next-59f97e4fe6b6d912c5db150ea9ae3a9ca466da91.zip | |
mmc: cavium-thunderx: Drop redundant calls to get|put_device()
Since commit 522811e944ed ("of: platform: stop accessing invalid dev in
of_platform_device_destroy"), there is no need to take a reference for the
device before calling of_platform_device_destroy(), hence let's drop this.
Signed-off-by: Ulf Hansson <ulf.hansson@oss.qualcomm.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Diffstat (limited to 'drivers/mmc/host')
| -rw-r--r-- | drivers/mmc/host/cavium-thunderx.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c index 84ff6d82ae3c..eecac003e546 100644 --- a/drivers/mmc/host/cavium-thunderx.c +++ b/drivers/mmc/host/cavium-thunderx.c @@ -157,11 +157,8 @@ error: for (i = 0; i < CAVIUM_MAX_MMC; i++) { if (host->slot[i]) cvm_mmc_of_slot_remove(host->slot[i]); - if (host->slot_pdev[i]) { - get_device(&host->slot_pdev[i]->dev); + if (host->slot_pdev[i]) of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL); - put_device(&host->slot_pdev[i]->dev); - } } clk_disable_unprepare(host->clk); return ret; |
