[SCSI] cxgbi3: remove unnecessary NULL test
authorJiri Slaby <jslaby@suse.cz>
Tue, 22 Dec 2009 00:27:55 +0000 (16:27 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Mon, 18 Jan 2010 16:48:14 +0000 (10:48 -0600)
Stanse found that c3cn is poked many times around in
cxgb3i_conn_pdu_ready, there is no need to check if it is NULL.

Remove the test.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/cxgb3i/cxgb3i_pdu.c

index 1fe3b0f1f3c94353fbda92df4769bfb82c28a0bc..9c38539557fc9fc356f383a91b8ebe121cd37bb7 100644 (file)
@@ -461,10 +461,8 @@ void cxgb3i_conn_pdu_ready(struct s3_conn *c3cn)
                skb = skb_peek(&c3cn->receive_queue);
        }
        read_unlock(&c3cn->callback_lock);
-       if (c3cn) {
-               c3cn->copied_seq += read;
-               cxgb3i_c3cn_rx_credits(c3cn, read);
-       }
+       c3cn->copied_seq += read;
+       cxgb3i_c3cn_rx_credits(c3cn, read);
        conn->rxdata_octets += read;
 
        if (err) {