aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-09-28 12:58:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-30 18:42:06 -0700
commita376932a93961db2024e0def126d3a9c9b6f37fe (patch)
tree496441e6d0f6af251246361bba175a9f262ac239 /drivers/staging
parent9cf66a95c7c8003fe85d76794fcf127ad72c6e35 (diff)
staging: rtl8712: remove unneeded NULL check
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8712/rtl8712_cmd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
index 088647cdca9..53f247b324e 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -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;