Commit 52a7fb09 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: rtl8192e: Fix smatch error in r8192E_phy.c

Smatch reports the following:

  CHECK   drivers/staging/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/r8192E_phy.c +940 rtl8192_phy_SwChnlStepByStep(92) error: potential null derefence 'CurrentCmd'.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ce7b393f
......@@ -937,7 +937,7 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
break;
}
if (CurrentCmd->CmdID == CmdID_End) {
if (CurrentCmd && CurrentCmd->CmdID == CmdID_End) {
if ((*stage) == 2) {
return true;
} else {
......@@ -947,6 +947,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
}
}
if (!CurrentCmd)
continue;
switch (CurrentCmd->CmdID) {
case CmdID_SetTxPowerLevel:
if (priv->IC_Cut > (u8)VERSION_8190_BD)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment