diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2017-04-08 11:07:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-09 09:26:27 +0200 |
commit | 2679a3fbef60884260542587e73565979f3d4fd1 (patch) | |
tree | 5d06fa59fc310372881e8960ca38022229194736 | |
parent | c49c1f2bdeef183c2bdf62f638406b115a318976 (diff) |
staging: rtl8723bs: Fix dereference before check warning in os_dep/recv_linux.c
Smatch lists the following warning:
CHECK drivers/staging/rtl8723bs/os_dep/recv_linux.c
drivers/staging/rtl8723bs/os_dep/recv_linux.c:353 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 312)
This warning is fixed by removing the test at line 353.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/recv_linux.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c index c677a5216b54..e731ab4e2bd7 100644 --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c @@ -350,8 +350,7 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame _recv_indicatepkt_drop: /* enqueue back to free_recv_queue */ - if (precv_frame) - rtw_free_recvframe(precv_frame, pfree_recv_queue); + rtw_free_recvframe(precv_frame, pfree_recv_queue); DBG_COUNTER(padapter->rx_logs.os_indicate_err); return _FAIL; |