diff options
-rw-r--r-- | drivers/pcmcia/cistpl.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/ds.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 4ff725ca2c74..8b3b49217287 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -1386,7 +1386,7 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *info) | |||
1386 | if (!s) | 1386 | if (!s) |
1387 | return -EINVAL; | 1387 | return -EINVAL; |
1388 | 1388 | ||
1389 | if (s->functions) { | 1389 | if (s->functions || !(s->state & SOCKET_PRESENT)) { |
1390 | WARN_ON(1); | 1390 | WARN_ON(1); |
1391 | return -EINVAL; | 1391 | return -EINVAL; |
1392 | } | 1392 | } |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 757119b87146..d3baf0bfca9f 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -667,6 +667,9 @@ static void pcmcia_requery(struct pcmcia_socket *s) | |||
667 | { | 667 | { |
668 | int has_pfc; | 668 | int has_pfc; |
669 | 669 | ||
670 | if (!(s->state & SOCKET_PRESENT)) | ||
671 | return; | ||
672 | |||
670 | if (s->functions == 0) { | 673 | if (s->functions == 0) { |
671 | pcmcia_card_add(s); | 674 | pcmcia_card_add(s); |
672 | return; | 675 | return; |