* [PATCH] mmc: cavium-thunderx: Drop redundant calls to get|put_device()
@ 2026-09-28 15:51 Ulf Hansson
0 siblings, 0 replies; only message in thread
From: Ulf Hansson @ 2026-09-28 15:51 UTC (permalink / raw)
To: linux-mmc, Ulf Hansson
Cc: Robert Richter, Guangshuo Li, linux-kernel, Ulf Hansson
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>
---
drivers/mmc/host/cavium-thunderx.c | 5 +----
1 file changed, 1 insertion(+), 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 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
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;
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-28 15:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 15:51 [PATCH] mmc: cavium-thunderx: Drop redundant calls to get|put_device() Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®