summaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/control.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-07-13 01:48:42 +0200
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 15:55:35 +0900
commita6346fa583766a51b7723288fc5d73ee5ea93479 (patch)
tree5c8a6a682a93eccde349c59705550e0ebbc5817d /drivers/net/wimax/i2400m/control.c
parentc29eaf3faef7547ba72355bac44e9ca6ffdaee39 (diff)
i2400m: keep index within ms_to_errno[]
Ensure that index `status' remains within ms_to_errno[] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/control.c')
-rw-r--r--drivers/net/wimax/i2400m/control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 07308686dbc..8fe70e75d03 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -263,7 +263,7 @@ int i2400m_msg_check_status(const struct i2400m_l3l4_hdr *l3l4_hdr,
if (status == 0)
return 0;
- if (status > ARRAY_SIZE(ms_to_errno)) {
+ if (status >= ARRAY_SIZE(ms_to_errno)) {
str = "unknown status code";
result = -EBADR;
} else {