mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: j223yang@asset.uwaterloo.ca
To: linux-kernel@vger.kernel.org
Cc: Trond.Myklebust@netapp.com
Subject: [patch]xprt: remove redundant null check
Date: Thu, 10 Mar 2011 12:40:28 -0500	[thread overview]
Message-ID: <20110310174028.GA10914@asset.uwaterloo.ca> (raw)

'req' is dereferenced before checked for NULL.
The patch simply removes the check.

Signed-off-by: Jinqiu Yang<crindy646@gmail.com>
---
 xprt.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
--- a/net/sunrpc/xprt.c	2011-03-10 11:20:16.408039185 -0500
+++ b/net/sunrpc/xprt.c	2011-03-10 11:32:28.132164761 -0500
@@ -202,10 +202,9 @@ int xprt_reserve_xprt(struct rpc_task *t
 		goto out_sleep;
 	}
 	xprt->snd_task = task;
-	if (req) {
-		req->rq_bytes_sent = 0;
-		req->rq_ntrans++;
-	}
+	req->rq_bytes_sent = 0;
+	req->rq_ntrans++;
+
 	return 1;
 
 out_sleep:

                 reply	other threads:[~2011-03-10 17:40 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=20110310174028.GA10914@asset.uwaterloo.ca \
    --to=j223yang@asset.uwaterloo.ca \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®