Commit 25998816 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Ulf Hansson

memstick: rtsx_pci_ms: Drop if block with always false condition

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/dd0d06ca9388fd8f6a3a8bb57354baaeaf56800a.1712757795.git.u.kleine-koenig@pengutronix.deSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent bce42d61
...@@ -581,9 +581,6 @@ static int rtsx_pci_ms_drv_remove(struct platform_device *pdev) ...@@ -581,9 +581,6 @@ static int rtsx_pci_ms_drv_remove(struct platform_device *pdev)
struct memstick_host *msh; struct memstick_host *msh;
int rc; int rc;
if (!host)
return 0;
pcr = host->pcr; pcr = host->pcr;
pcr->slots[RTSX_MS_CARD].p_dev = NULL; pcr->slots[RTSX_MS_CARD].p_dev = NULL;
pcr->slots[RTSX_MS_CARD].card_event = NULL; pcr->slots[RTSX_MS_CARD].card_event = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment