Skip to content

Commit

Permalink
b43: Fix assigning negative value to unsigned variable
Browse files Browse the repository at this point in the history
[ Upstream commit 11800d8 ]

fix warning reported by smatch:
drivers/net/wireless/broadcom/b43/phy_n.c:585 b43_nphy_adjust_lna_gain_table()
warn: assigning (-2) to unsigned variable '*(lna_gain[0])'

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/1648203315-28093-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Lotte-Bai authored and gregkh committed Jun 9, 2022
1 parent 4ae5a2c commit cc575b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/b43/phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev)
u16 data[4];
s16 gain[2];
u16 minmax[2];
static const u16 lna_gain[4] = { -2, 10, 19, 25 };
static const s16 lna_gain[4] = { -2, 10, 19, 25 };

if (nphy->hang_avoid)
b43_nphy_stay_in_carrier_search(dev, 1);
Expand Down

0 comments on commit cc575b8

Please sign in to comment.