wavelan: Test arraysize before an element of the array.
Test arraysize before an element of the array. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
076ae609d2
commit
4d8faf6937
|
@ -4281,8 +4281,7 @@ int __init init_module(void)
|
||||||
|
|
||||||
|
|
||||||
/* Loop on all possible base addresses. */
|
/* Loop on all possible base addresses. */
|
||||||
i = -1;
|
for (i = 0; i < ARRAY_SIZE(io) && io[i] != 0; i++) {
|
||||||
while ((io[++i] != 0) && (i < ARRAY_SIZE(io))) {
|
|
||||||
struct net_device *dev = alloc_etherdev(sizeof(net_local));
|
struct net_device *dev = alloc_etherdev(sizeof(net_local));
|
||||||
if (!dev)
|
if (!dev)
|
||||||
break;
|
break;
|
||||||
|
|
Reference in New Issue