projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
076ae60
)
wavelan: Test arraysize before an element of the array.
author
Roel Kluin
<roel.kluin@gmail.com>
Wed, 11 Feb 2009 20:51:31 +0000
(21:51 +0100)
committer
John W. Linville
<linville@tuxdriver.com>
Fri, 27 Feb 2009 19:51:41 +0000
(14:51 -0500)
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>
drivers/net/wireless/wavelan.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/wireless/wavelan.c
b/drivers/net/wireless/wavelan.c
index 688bdea8f13a8cc1b74c025e7bdd4acb40528699..b728541f2fb538c116367fb0241e1247b0859d64 100644
(file)
--- a/
drivers/net/wireless/wavelan.c
+++ b/
drivers/net/wireless/wavelan.c
@@
-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;