summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/rsrc_mgr.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-09-28 19:41:56 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-05 23:41:14 +0100
commitde75914ee103a30d82ad21b39b7e04f70e4fa1f0 (patch)
tree492f275d49d2e37449ba89594127ebca8502cb3f /drivers/pcmcia/rsrc_mgr.c
parent9da4bc6d6a38c1c3d850c046d0aee324c1a2e52a (diff)
[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/rsrc_mgr.c')
-rw-r--r--drivers/pcmcia/rsrc_mgr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
index 0668384ebc8..b02598a5a91 100644
--- a/drivers/pcmcia/rsrc_mgr.c
+++ b/drivers/pcmcia/rsrc_mgr.c
@@ -98,10 +98,12 @@ int pcmcia_adjust_resource_info(adjust_t *adj)
}
EXPORT_SYMBOL(pcmcia_adjust_resource_info);
-void pcmcia_validate_mem(struct pcmcia_socket *s)
+int pcmcia_validate_mem(struct pcmcia_socket *s)
{
if (s->resource_ops->validate_mem)
- s->resource_ops->validate_mem(s);
+ return s->resource_ops->validate_mem(s);
+ /* if there is no callback, we can assume that everything is OK */
+ return 0;
}
EXPORT_SYMBOL(pcmcia_validate_mem);