|
@@ -144,8 +144,7 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)
|
|
if (aq_ret == I40E_ERR_ADMIN_QUEUE_TIMEOUT)
|
|
if (aq_ret == I40E_ERR_ADMIN_QUEUE_TIMEOUT)
|
|
return -EAGAIN;
|
|
return -EAGAIN;
|
|
|
|
|
|
- if (aq_rc >= (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0])) ||
|
|
|
|
- aq_rc < 0)
|
|
|
|
|
|
+ if (!((u32)aq_rc < (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0]))))
|
|
return -ERANGE;
|
|
return -ERANGE;
|
|
|
|
|
|
return aq_to_posix[aq_rc];
|
|
return aq_to_posix[aq_rc];
|