summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2009-12-22 01:27:55 +0100
committerJames Bottomley <James.Bottomley@suse.de>2010-01-18 17:48:14 +0100
commit0ed8570ef4d51bb46e2028b2e3c3ddd1f860e193 (patch)
tree3269e0a13805606c94495478988d2dc6d80c043f
parent[SCSI] pm8001: Use kzalloc for allocating only one thing (diff)
downloadlinux-0ed8570ef4d51bb46e2028b2e3c3ddd1f860e193.tar.xz
linux-0ed8570ef4d51bb46e2028b2e3c3ddd1f860e193.zip
[SCSI] cxgbi3: remove unnecessary NULL test
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>
-rw-r--r--drivers/scsi/cxgb3i/cxgb3i_pdu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/cxgb3i/cxgb3i_pdu.c b/drivers/scsi/cxgb3i/cxgb3i_pdu.c
index 1fe3b0f1f3c9..9c38539557fc 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_pdu.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_pdu.c
@@ -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) {