Skip to content

Commit

Permalink
b43legacy: Fix assigning negative value to unsigned variable
Browse files Browse the repository at this point in the history
[ Upstream commit 3f6b867 ]

fix warning reported by smatch:
drivers/net/wireless/broadcom/b43legacy/phy.c:1181 b43legacy_phy_lo_b_measure()
warn: assigning (-772) to unsigned variable 'fval'

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/1648203433-8736-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 74ad0d7 commit 4ae5a2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/b43legacy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ void b43legacy_phy_lo_b_measure(struct b43legacy_wldev *dev)
struct b43legacy_phy *phy = &dev->phy;
u16 regstack[12] = { 0 };
u16 mls;
u16 fval;
s16 fval;
int i;
int j;

Expand Down

0 comments on commit 4ae5a2c

Please sign in to comment.