Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d8faf69 authored by Roel Kluin's avatar Roel Kluin Committed by John W. Linville
Browse files

wavelan: Test arraysize before an element of the array.



Test arraysize before an element of the array.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 076ae609
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;