staging: rtl8192e: Fix smatch warning in rtl819x_BAProc.c
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 1 Sep 2011 17:23:18 +0000 (12:23 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:35:58 +0000 (16:35 -0700)
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>
drivers/staging/rtl8192e/rtl819x_BAProc.c

index 48f9f71051e4b247ff3ca7a24fa9d042b5cae5d5..330a3a96babb93a7f78b6a7fcce00a080c369210 100644 (file)
@@ -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));