]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8712: remove unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 28 Sep 2013 09:58:33 +0000 (12:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2013 01:42:06 +0000 (18:42 -0700)
We knew "peventbuf" was a valid pointer and "peventbuf + 2" is also
non-NULL.  I have removed the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_cmd.c

index 088647cdca9953cd47783c4ac41cdbfed9cac512..53f247b324e019176d2a9a7a5d48b3f455c53a63 100644 (file)
@@ -471,11 +471,9 @@ void r8712_event_handle(struct _adapter *padapter, uint *peventbuf)
        if (pevt_priv->event_seq > 127)
                pevt_priv->event_seq = 0;
        peventbuf = peventbuf + 2; /* move to event content, 8 bytes alignment */
-       if (peventbuf) {
-               event_callback = wlanevents[evt_code].event_callback;
-               if (event_callback)
-                       event_callback(padapter, (u8 *)peventbuf);
-       }
+       event_callback = wlanevents[evt_code].event_callback;
+       if (event_callback)
+               event_callback(padapter, (u8 *)peventbuf);
        pevt_priv->evt_done_cnt++;
 _abort_event_:
        return;