浏览代码

pcmcia: rsrc_nonstatic: check value, not pointer

Bug found by Harvey Harrison and Stephen Rothwell.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Dominik Brodowski 17 年之前
父节点
当前提交
0e09c863db
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/pcmcia/rsrc_nonstatic.c

+ 1 - 1
drivers/pcmcia/rsrc_nonstatic.c

@@ -275,7 +275,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res,
 		destroy_cis_cache(s);
 	}
 	s->cis_mem.res = NULL;
-	if ((ret != 0) || (count == 0))
+	if ((ret != 0) || (*count == 0))
 		return 0;
 	return 1;
 }