diff options
author | Hugh Dickins <hugh@veritas.com> | 2006-03-10 21:15:19 +0000 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 17:30:51 +0200 |
commit | b2f51a1cb4e1d72061d7a3f7905affdb7d074fec (patch) | |
tree | ddb60a660b40afa7d1de5b8c71d665aea09da329 /drivers/pcmcia | |
parent | 30bac7aa0e3678c79ff00fc9372f34712eeb34fc (diff) | |
download | op-kernel-dev-b2f51a1cb4e1d72061d7a3f7905affdb7d074fec.zip op-kernel-dev-b2f51a1cb4e1d72061d7a3f7905affdb7d074fec.tar.gz |
[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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 8966dd0..ae10d1e 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -464,7 +464,7 @@ static int pcmcia_device_remove(struct device * dev) * all devices */ did = (struct pcmcia_device_id *) p_dev->dev.driver_data; - if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && + if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && (p_dev->socket->device_count != 0) && (p_dev->device_no == 0)) pcmcia_card_remove(p_dev->socket, p_dev); |