Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 130cf72f authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: Fix some indenting problems and a potential data overrun



Smatch reports the following:

  CHECK   drivers/staging/rtl8723bs/core/rtw_wlan_util.c
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:67 cckrates_included() warn: if statement not indented
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:81 cckratesonly_included() warn: if statement not indented
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:815 rtw_camid_alloc() warn: should '1 << (cam_id)' be a 64 bit type?

The first two are fixed with white-space changes. The third is fixed by
restricting cam_id to be less than 32.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 50049224
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -811,7 +811,7 @@ s16 rtw_camid_alloc(struct adapter *adapter, struct sta_info *sta, u8 kid)
	}

bitmap_handle:
	if (cam_id >= 0)
	if (cam_id >= 0 && cam_id < 32)
		cam_ctl->bitmap |= BIT(cam_id);

	spin_unlock_bh(&cam_ctl->lock);