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

Commit a6346fa5 authored by Roel Kluin's avatar Roel Kluin Committed by Inaky Perez-Gonzalez
Browse files

i2400m: keep index within ms_to_errno[]



Ensure that index `status' remains within ms_to_errno[]

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
parent c29eaf3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {