All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cxgb3i: remove some pointless conditionals before kfree_skb()
@ 2009-02-25 10:25 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2009-02-25 10:25 UTC (permalink / raw)
  To: James Bottomley, Wei Yongjun; +Cc: linux-scsi

Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 drivers/scsi/cxgb3i/cxgb3i_offload.c |    9 +++------
 drivers/scsi/cxgb3i/cxgb3i_pdu.c     |    3 +--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/cxgb3i/cxgb3i_offload.c b/drivers/scsi/cxgb3i/cxgb3i_offload.c
index a865f1f..8b3754a 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_offload.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c
@@ -1208,12 +1208,9 @@ static int do_wr_ack(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
  */
 static void c3cn_free_cpl_skbs(struct s3_conn *c3cn)
 {
-	if (c3cn->cpl_close)
-		kfree_skb(c3cn->cpl_close);
-	if (c3cn->cpl_abort_req)
-		kfree_skb(c3cn->cpl_abort_req);
-	if (c3cn->cpl_abort_rpl)
-		kfree_skb(c3cn->cpl_abort_rpl);
+	kfree_skb(c3cn->cpl_close);
+	kfree_skb(c3cn->cpl_abort_req);
+	kfree_skb(c3cn->cpl_abort_rpl);
 }
 
 static int c3cn_alloc_cpl_skbs(struct s3_conn *c3cn)
diff --git a/drivers/scsi/cxgb3i/cxgb3i_pdu.c b/drivers/scsi/cxgb3i/cxgb3i_pdu.c
index ce7ce8c..a0d4f43 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_pdu.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_pdu.c
@@ -149,8 +149,7 @@ void cxgb3i_conn_cleanup_task(struct iscsi_task *task)
 	struct iscsi_tcp_task *tcp_task = task->dd_data;
 
 	/* never reached the xmit task callout */
-	if (tcp_task->dd_data)
-		kfree_skb(tcp_task->dd_data);
+	kfree_skb(tcp_task->dd_data);
 	tcp_task->dd_data = NULL;
 
 	/* MNC - Do we need a check in case this is called but
-- 
1.5.3.8





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-25 10:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 10:25 [PATCH] cxgb3i: remove some pointless conditionals before kfree_skb() Wei Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.