aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2006-03-10 16:15:19 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:30:51 -0500
commitb2f51a1cb4e1d72061d7a3f7905affdb7d074fec (patch)
treeddb60a660b40afa7d1de5b8c71d665aea09da329 /drivers/pcmcia
parent30bac7aa0e3678c79ff00fc9372f34712eeb34fc (diff)
[PATCH] pcmcia: fix pcmcia_device_remove oops
Fix pcmcia_device_remove NULL pointer dereference at shutdown. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 8966dd09139d..ae10d1eed65e 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -464,7 +464,7 @@ static int pcmcia_device_remove(struct device * dev)
464 * all devices 464 * all devices
465 */ 465 */
466 did = (struct pcmcia_device_id *) p_dev->dev.driver_data; 466 did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
467 if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && 467 if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
468 (p_dev->socket->device_count != 0) && 468 (p_dev->socket->device_count != 0) &&
469 (p_dev->device_no == 0)) 469 (p_dev->device_no == 0))
470 pcmcia_card_remove(p_dev->socket, p_dev); 470 pcmcia_card_remove(p_dev->socket, p_dev);