[PATCH 1/3] memstick: rtsx_pci_ms: Drop if block with always false condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rtsx_pci_ms_drv_remove() is only called after rtsx_pci_ms_drv_probe()
completed successfully. In this case platform_set_drvdata() was called
with a non-NULL argument and so platform_get_drvdata() won't return
NULL.

Simplify by removing the if block with the always false condition.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 drivers/memstick/host/rtsx_pci_ms.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/memstick/host/rtsx_pci_ms.c b/drivers/memstick/host/rtsx_pci_ms.c
index 15720a4afac2..7c6dba6de230 100644
--- a/drivers/memstick/host/rtsx_pci_ms.c
+++ b/drivers/memstick/host/rtsx_pci_ms.c
@@ -581,9 +581,6 @@ static int rtsx_pci_ms_drv_remove(struct platform_device *pdev)
 	struct memstick_host *msh;
 	int rc;
 
-	if (!host)
-		return 0;
-
 	pcr = host->pcr;
 	pcr->slots[RTSX_MS_CARD].p_dev = NULL;
 	pcr->slots[RTSX_MS_CARD].card_event = NULL;
-- 
2.43.0





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux