diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-09-28 21:41:56 +0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-06 01:41:14 +0300 |
commit | de75914ee103a30d82ad21b39b7e04f70e4fa1f0 (patch) | |
tree | 492f275d49d2e37449ba89594127ebca8502cb3f /drivers/pcmcia/ds.c | |
parent | 9da4bc6d6a38c1c3d850c046d0aee324c1a2e52a (diff) | |
download | linux-de75914ee103a30d82ad21b39b7e04f70e4fa1f0.tar.xz |
[PATCH] pcmcia: validate_mem shouldn't be void
Add a return value to pcmcia_validate_mem. Only if we have enough memory
available to map the CIS, we should proceed in trying to determine information
about the device.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r-- | drivers/pcmcia/ds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 6fb76399547e..b120794c03a9 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -583,7 +583,9 @@ static int pcmcia_card_add(struct pcmcia_socket *s) if (!(s->resource_setup_done)) return -EAGAIN; /* try again, but later... */ - pcmcia_validate_mem(s); + if (pcmcia_validate_mem(s)) + return -EAGAIN; /* try again, but later... */ + ret = pccard_validate_cis(s, BIND_FN_ALL, &cisinfo); if (ret || !cisinfo.Chains) { ds_dbg(0, "invalid CIS or invalid resources\n"); |