pFifoHead points to tx_buffer->fifo_head which can never be NULL.
We also don't need to check for tx_buffer being NULL instead, since it
always points to ->Data of struct vnt_usb_send_context - the pointer to
which was checked before calling s_vGenerateTxParameter().

Silences a dereference before NULL check warning reported by the coverity
scanner in CID 1127221.

Cc: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: Tobias Klauser <tklau...@distanz.ch>
---
 drivers/staging/vt6656/rxtx.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 19a8741..28f40e6 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -813,9 +813,6 @@ static u16 s_vGenerateTxParameter(struct vnt_private 
*pDevice,
        else if (wFifoCtl & FIFOCTL_AUTO_FB_1)
                byFBOption = AUTO_FB_1;
 
-       if (!pFifoHead)
-               return 0;
-
        if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
                if (need_rts) {
                        struct vnt_rrv_time_rts *pBuf =
-- 
1.7.9.5


_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to