staging: r8188eu: Fix smatch warnings in core/rtw_xmit.c
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 4 Sep 2013 20:56:05 +0000 (15:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 14:47:45 +0000 (07:47 -0700)
commit1ad866e7bf1c64238d77aa5e390e90cf7a5c6c41
treef94d043a507dbd1b83034569a698ce2b2ba20055
parentf23e3c1e9c9c55afff39a37200e9760692ff16b6
staging: r8188eu: Fix smatch warnings in core/rtw_xmit.c

Smatch reports the following:
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:1500 hal_EfusePgPacketWriteData() info: ignoring unreachable code.
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2188 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2190 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2196 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2197 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14

The first of these is trivial. The rest are due to an off-by-one error
in a loop over the channels.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c