提交 0e09c863 编写于 作者: D Dominik Brodowski

pcmcia: rsrc_nonstatic: check value, not pointer

Bug found by Harvey Harrison and Stephen Rothwell.
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 c010b2f7
...@@ -275,7 +275,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, ...@@ -275,7 +275,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res,
destroy_cis_cache(s); destroy_cis_cache(s);
} }
s->cis_mem.res = NULL; s->cis_mem.res = NULL;
if ((ret != 0) || (count == 0)) if ((ret != 0) || (*count == 0))
return 0; return 0;
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册