wil6210: fix array out of bounds access in pmc
authorDedy Lansky <qca_dlansky@qca.qualcomm.com>
Wed, 5 Apr 2017 11:58:13 +0000 (14:58 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 13 Apr 2017 12:46:21 +0000 (15:46 +0300)
commit98a830a98dab6d474190bec72c4a4ad0f7f9bf75
tree5c16e7d3d5a66b5f5a3d0da47a4c2258987a6d7a
parentbd50e2688a7812754e964231c850e8414751df1d
wil6210: fix array out of bounds access in pmc

Array index 'i' is used before limits check.
Fix this by doing limits check first.

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/wil6210/pmc.c