All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
	Wei Yongjun <yjwei@cn.fujitsu.com>
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] cxgb3i: remove some pointless conditionals before kfree_skb()
Date: Wed, 25 Feb 2009 18:25:03 +0800	[thread overview]
Message-ID: <49A51C7F.3050903@cn.fujitsu.com> (raw)

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





                 reply	other threads:[~2009-02-25 10:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49A51C7F.3050903@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.