Commit 5a26baff authored by Russell King's avatar Russell King

[PCMCIA] Don't add CIS cache entries on failure.

If we fail to map the CIS space, don't pollute the CIS cache with
invalid data.
parent 8bb27707
......@@ -293,6 +293,7 @@ static void read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr,
#endif
ret = read_cis_mem(s, attr, addr, len, ptr);
if (ret == 0) {
/* Copy data into the cache */
cis = kmalloc(sizeof(struct cis_cache_entry) + len, GFP_KERNEL);
if (cis) {
......@@ -302,6 +303,7 @@ static void read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr,
memcpy(cis->cache, ptr, len);
list_add(&cis->node, &s->cis_cache);
}
}
}
static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment