summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2006-03-10 22:13:44 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-10 22:40:26 +0100
commit4ceadbf519c6820b236a9a213255260eb825974b (patch)
tree41258b7a6572fe0823695842296519baa51cc766 /drivers/pcmcia
parent[PATCH] slab: Node rotor for freeing alien caches and remote per cpu pages. (diff)
downloadlinux-4ceadbf519c6820b236a9a213255260eb825974b.tar.xz
linux-4ceadbf519c6820b236a9a213255260eb825974b.zip
[PATCH] fix pcmcia_device_probe oops
Fix pcmcia_device_probe NULL pointer dereference at startup. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 54ad93daca3c..bb96ce1db08c 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -411,7 +411,7 @@ static int pcmcia_device_probe(struct device * dev)
* pseudo devices, and if not, add the second one.
*/
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 == 1) && (p_dev->device_no == 0))
pcmcia_add_pseudo_device(p_dev->socket);