Skip to content

Commit

Permalink
staging: rtl8192e: Fix smatch warning in rtl819x_BAProc.c
Browse files Browse the repository at this point in the history
Smatch outputs the following warning:

  CHECK   drivers/staging/rtl8192e/rtl819x_BAProc.c
drivers/staging/rtl8192e/rtl819x_BAProc.c +88 rtllib_ADDBA(12) warn: variable dereferenced before check 'ieee'

As ieee cannot be NULL at this point, remove all such checks.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Larry Finger authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent a07663e commit ce7b393
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/rtl8192e/rtl819x_BAProc.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
u8 *tag = NULL;
u16 tmp = 0;
u16 len = ieee->tx_headroom + 9;

RTLLIB_DEBUG(RTLLIB_DL_TRACE | RTLLIB_DL_BA, "========>%s(), frame(%d)"
" sentd to: %pM, ieee->dev:%p\n", __func__,
type, Dst, ieee->dev);
if (pBA == NULL || ieee == NULL) {
RTLLIB_DEBUG(RTLLIB_DL_ERR, "pBA(%p) is NULL or ieee(%p) is "
"NULL\n", pBA, ieee);
if (pBA == NULL) {
RTLLIB_DEBUG(RTLLIB_DL_ERR, "pBA(%p) is NULL\n");
return NULL;
}
skb = dev_alloc_skb(len + sizeof(struct rtllib_hdr_3addr));
Expand Down

0 comments on commit ce7b393

Please sign in to comment.