linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Varun Prakash <varun@chelsio.com>
To: Colin King <colin.king@canonical.com>
Cc: "James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] csi: libcxgbi: remove redundant check and close on csk
Date: Mon, 11 Sep 2017 14:51:59 +0530	[thread overview]
Message-ID: <20170911092156.GA1721@chelsio.com> (raw)
In-Reply-To: <20170907135133.16636-1-colin.king@canonical.com>

On Thu, Sep 07, 2017 at 02:51:33PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> csk is always null on the error return path and so the non-null
> check and call to cxgbi_sock_closed on csk is redundant and
> can be removed.
> 
> Detected by: CoverityScan CID#114329 ("Logically dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/scsi/cxgbi/libcxgbi.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
> index 512c8f1ea5b0..da36c2de069e 100644
> --- a/drivers/scsi/cxgbi/libcxgbi.c
> +++ b/drivers/scsi/cxgbi/libcxgbi.c
> @@ -688,8 +688,6 @@ cxgbi_check_route(struct sockaddr *dst_addr, int ifindex)
>  
>  rel_rt:
>  	ip_rt_put(rt);
> -	if (csk)
> -		cxgbi_sock_closed(csk);
>  err_out:
>  	return ERR_PTR(err);
>  }

Acked-by: Varun Prakash <varun@chelsio.com> 

  reply	other threads:[~2017-09-11  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 13:51 [PATCH] csi: libcxgbi: remove redundant check and close on csk Colin King
2017-09-11  9:21 ` Varun Prakash [this message]
2017-09-16  1:45 ` Martin K. Petersen

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=20170911092156.GA1721@chelsio.com \
    --to=varun@chelsio.com \
    --cc=colin.king@canonical.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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;
as well as URLs for NNTP newsgroup(s).