aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cistpl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index 884a984216fe..4ff725ca2c74 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -168,9 +168,12 @@ int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
168 } else { 168 } else {
169 u_int inc = 1, card_offset, flags; 169 u_int inc = 1, card_offset, flags;
170 170
171 if (addr > CISTPL_MAX_CIS_SIZE) 171 if (addr > CISTPL_MAX_CIS_SIZE) {
172 dev_dbg(&s->dev, 172 dev_dbg(&s->dev,
173 "attempt to read CIS mem at addr %#x", addr); 173 "attempt to read CIS mem at addr %#x", addr);
174 memset(ptr, 0xff, len);
175 return -1;
176 }
174 177
175 flags = MAP_ACTIVE | ((cis_width) ? MAP_16BIT : 0); 178 flags = MAP_ACTIVE | ((cis_width) ? MAP_16BIT : 0);
176 if (attr) { 179 if (attr) {