提交 4d8faf69 编写于 作者: R Roel Kluin 提交者: John W. Linville

wavelan: Test arraysize before an element of the array.

Test arraysize before an element of the array.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 076ae609
......@@ -4281,8 +4281,7 @@ int __init init_module(void)
/* Loop on all possible base addresses. */
i = -1;
while ((io[++i] != 0) && (i < ARRAY_SIZE(io))) {
for (i = 0; i < ARRAY_SIZE(io) && io[i] != 0; i++) {
struct net_device *dev = alloc_etherdev(sizeof(net_local));
if (!dev)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册