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>
This commit is contained in:
Родитель
1e28eed176
Коммит
cd2b4f14ed
|
@ -371,9 +371,6 @@ static int pcmcia_device_remove(struct device *dev)
|
||||||
pcmcia_card_remove(p_dev->socket, p_dev);
|
pcmcia_card_remove(p_dev->socket, p_dev);
|
||||||
|
|
||||||
/* detach the "instance" */
|
/* detach the "instance" */
|
||||||
if (!p_drv)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (p_drv->remove)
|
if (p_drv->remove)
|
||||||
p_drv->remove(p_dev);
|
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",
|
"pcmcia: driver %s did not release window properly\n",
|
||||||
p_drv->name);
|
p_drv->name);
|
||||||
|
|
||||||
/* references from pcmcia_probe_device */
|
/* references from pcmcia_device_probe */
|
||||||
pcmcia_put_dev(p_dev);
|
pcmcia_put_dev(p_dev);
|
||||||
module_put(p_drv->owner);
|
module_put(p_drv->owner);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче