summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/ds.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-03-01 18:38:47 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2021-03-15 08:21:46 +0100
commitcd2b4f14edaba60f4f8d429d46e3636202a30f5e (patch)
treea253036cefd0ba5b9a72b6ce12a5169723945996 /drivers/pcmcia/ds.c
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff)
pcmcia: ds: Remove if with always false condition
pcmcia_device_remove() is only ever called by the driver core with dev->driver pointing to a valid driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [linux@dominikbrodowski.net: shorten commit message, fix reference to pcmcia_device_probe] Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r--drivers/pcmcia/ds.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 72114907c0e4..6ecb64140f37 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -371,9 +371,6 @@ static int pcmcia_device_remove(struct device *dev)
pcmcia_card_remove(p_dev->socket, p_dev);
/* detach the "instance" */
- if (!p_drv)
- return 0;
-
if (p_drv->remove)
p_drv->remove(p_dev);
@@ -389,7 +386,7 @@ static int pcmcia_device_remove(struct device *dev)
"pcmcia: driver %s did not release window properly\n",
p_drv->name);
- /* references from pcmcia_probe_device */
+ /* references from pcmcia_device_probe */
pcmcia_put_dev(p_dev);
module_put(p_drv->owner);