memstick: rtsx_pci_ms: Drop if block with always false condition
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 10 Apr 2024 14:05:48 +0000 (16:05 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 25 Apr 2024 09:58:52 +0000 (11:58 +0200)
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@pengutronix.de>
Link: https://lore.kernel.org/r/dd0d06ca9388fd8f6a3a8bb57354baaeaf56800a.1712757795.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/memstick/host/rtsx_pci_ms.c

index 15720a4afac22592e7905a903d17199723d73944..7c6dba6de230cbb507ea0dbf646ed1d9b7180d52 100644 (file)
@@ -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;