rtl8188eu: Fix smatch warnings in hal/rtl8188e_hal_init.c

Smatch displays the following:
  CHECK   /home/finger/rtl8188eu/hal/rtl8188e_hal_init.c
/home/finger/rtl8188eu/hal/rtl8188e_hal_init.c:1695 hal_EfusePgPacketWriteData() info: ignoring unreachable code.
/home/finger/rtl8188eu/hal/rtl8188e_hal_init.c:2269 Hal_ReadPowerValueFromPROM_8188E() error: buffer overflow 'pwrInfo24G->IndexBW40_Base[rfPath]' 5 <= 5
/home/finger/rtl8188eu/hal/rtl8188e_hal_init.c:2466 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14
/home/finger/rtl8188eu/hal/rtl8188e_hal_init.c:2468 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14
/home/finger/rtl8188eu/hal/rtl8188e_hal_init.c:2474 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14
/home/finger/rtl8188eu/hal/rtl8188e_hal_init.c:2475 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-09-05 22:32:25 -05:00
parent 96ba7d3cca
commit a5e071f8da

View file

@ -1674,7 +1674,6 @@ static bool hal_EfusePgPacketWrite1ByteHeader(struct adapter *pAdapter, u8 efuse
static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt, bool bPseudoTest) static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt, bool bPseudoTest)
{ {
bool bRet = false;
u16 efuse_addr = *pAddr; u16 efuse_addr = *pAddr;
u8 badworden = 0; u8 badworden = 0;
u32 PgWriteSuccess = 0; u32 PgWriteSuccess = 0;
@ -1692,7 +1691,6 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u
else else
return true; return true;
} }
return bRet;
} }
static bool static bool
@ -2460,7 +2458,7 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool Auto
pHalData->bTXPowerDataReadFromEEPORM = true; pHalData->bTXPowerDataReadFromEEPORM = true;
for (rfPath = 0; rfPath < pHalData->NumTotalRFPath; rfPath++) { for (rfPath = 0; rfPath < pHalData->NumTotalRFPath; rfPath++) {
for (ch = 0; ch <= CHANNEL_MAX_NUMBER; ch++) { for (ch = 0; ch < CHANNEL_MAX_NUMBER; ch++) {
bIn24G = Hal_GetChnlGroup88E(ch, &group); bIn24G = Hal_GetChnlGroup88E(ch, &group);
if (bIn24G) { if (bIn24G) {
pHalData->Index24G_CCK_Base[rfPath][ch] = pwrInfo24G.IndexCCK_Base[rfPath][group]; pHalData->Index24G_CCK_Base[rfPath][ch] = pwrInfo24G.IndexCCK_Base[rfPath][group];