[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>
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 54ad93d..bb96ce1 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -411,7 +411,7 @@
 	 * 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);