提交 e71c9fac 编写于 作者: L Luis R. Rodriguez 提交者: John W. Linville

ath5k/phy.c: fix negative array index

Author: Adrian Bunk <bunk@kernel.org>

This patch fixes a negative array index spotted by the Coverity checker.

Changes-licensed-under: ISC
Acked-by: NNick Kossifidis <mickflemm@gmail.com>
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 6844e63a
......@@ -1178,6 +1178,9 @@ static int ath5k_hw_rf5112_rfregs(struct ath5k_hw *ah,
(channel->center_freq >= 5260 ? 1 :
(channel->center_freq > 4000 ? 0 : -1)));
if (obdb == -1)
return -EINVAL;
if (!ath5k_hw_rfregs_op(rf, ah->ah_offset[6],
ee->ee_ob[ee_mode][obdb], 3, 279, 0, true))
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册