mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-09 20:31:13 -05:00
i2400m: keep index within ms_to_errno[]
Ensure that index `status' remains within ms_to_errno[] Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: Inaky Perez-Gonzalez <[email protected]>
This commit is contained in:
parent
c29eaf3fae
commit
a6346fa583
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue