Skip to content

Commit 2599881

Browse files
Uwe Kleine-KönigUlf Hansson
authored andcommitted
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: 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>
1 parent bce42d6 commit 2599881

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/memstick/host/rtsx_pci_ms.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,6 @@ static int rtsx_pci_ms_drv_remove(struct platform_device *pdev)
581581
struct memstick_host *msh;
582582
int rc;
583583

584-
if (!host)
585-
return 0;
586-
587584
pcr = host->pcr;
588585
pcr->slots[RTSX_MS_CARD].p_dev = NULL;
589586
pcr->slots[RTSX_MS_CARD].card_event = NULL;

0 commit comments

Comments
 (0)