diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-09-28 13:41:56 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 17:41:14 -0500 |
commit | de75914ee103a30d82ad21b39b7e04f70e4fa1f0 (patch) | |
tree | 492f275d49d2e37449ba89594127ebca8502cb3f /drivers/pcmcia/rsrc_mgr.c | |
parent | 9da4bc6d6a38c1c3d850c046d0aee324c1a2e52a (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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c index 0668384ebc8b..b02598a5a912 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) | |||
98 | } | 98 | } |
99 | EXPORT_SYMBOL(pcmcia_adjust_resource_info); | 99 | EXPORT_SYMBOL(pcmcia_adjust_resource_info); |
100 | 100 | ||
101 | void pcmcia_validate_mem(struct pcmcia_socket *s) | 101 | int pcmcia_validate_mem(struct pcmcia_socket *s) |
102 | { | 102 | { |
103 | if (s->resource_ops->validate_mem) | 103 | if (s->resource_ops->validate_mem) |
104 | s->resource_ops->validate_mem(s); | 104 | return s->resource_ops->validate_mem(s); |
105 | /* if there is no callback, we can assume that everything is OK */ | ||
106 | return 0; | ||
105 | } | 107 | } |
106 | EXPORT_SYMBOL(pcmcia_validate_mem); | 108 | EXPORT_SYMBOL(pcmcia_validate_mem); |
107 | 109 | ||