mmc: cavium-thunderx: Drop redundant calls to get|put_device()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/mmc/host/cavium-thunderx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/mmc/host/cavium-thunderx.c +1 -4
@@ -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;
Signature · 1 line
2.43.0