Skip to content

Commit

Permalink
[PATCH] fix pcmcia_device_probe oops
Browse files Browse the repository at this point in the history
Fix pcmcia_device_probe NULL pointer dereference at startup.

Signed-off-by: Hugh Dickins <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Mar 10, 2006
1 parent 8fce4d8 commit 4ceadbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4ceadbf

Please sign in to comment.