Commit db84803c authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: use ARRAY_SIZE for mlme_sta_tbl

Use ARRAY_SIZE instead of hard-coding the number of entries in the
mlme_sta_tbl array.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-7-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7d0b25d7
......@@ -404,7 +404,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
return;
index = (le16_to_cpu(hdr->frame_control) & IEEE80211_FCTL_STYPE) >> 4;
if (index > 13)
if (index > ARRAY_SIZE(mlme_sta_tbl))
return;
fct = mlme_sta_tbl[index];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment