public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Ewan Milne <emilne@redhat.com>
To: Maurizio Lombardi <mlombard@redhat.com>
Cc: QLogic-Storage-Upstream@qlogic.com, JBottomley@odin.com,
	linux-scsi@vger.kernel.org, chad.dupuis@qlogic.com
Subject: Re: [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code.
Date: Mon, 01 Feb 2016 10:32:04 -0500	[thread overview]
Message-ID: <1454340724.22112.219.camel@localhost.localdomain> (raw)
In-Reply-To: <1454339325-12579-1-git-send-email-mlombard@redhat.com>

On Mon, 2016-02-01 at 16:08 +0100, Maurizio Lombardi wrote:
> If the link is not ready, the bnx2fc_eh_abort() function
> should return FAILED.
> 
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
>  drivers/scsi/bnx2fc/bnx2fc_io.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 0002caf..2230dab 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1104,8 +1104,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
>  	struct bnx2fc_cmd *io_req;
>  	struct fc_lport *lport;
>  	struct bnx2fc_rport *tgt;
> -	int rc = FAILED;
> -
> +	int rc;
>  
>  	rc = fc_block_scsi_eh(sc_cmd);
>  	if (rc)
> @@ -1114,7 +1113,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
>  	lport = shost_priv(sc_cmd->device->host);
>  	if ((lport->state != LPORT_ST_READY) || !(lport->link_up)) {
>  		printk(KERN_ERR PFX "eh_abort: link not ready\n");
> -		return rc;
> +		return FAILED;
>  	}
>  
>  	tgt = (struct bnx2fc_rport *)&rp[1];

Yes, because setting the initial setting of rc = FAILED is overwritten
by the result of fc_block_scsi_eh().

Reviewed-by: Ewan D. Milne <emilne@redhat.com>



  reply	other threads:[~2016-02-01 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 15:08 [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code Maurizio Lombardi
2016-02-01 15:32 ` Ewan Milne [this message]
2016-02-01 16:02 ` Chad Dupuis
2016-02-02  1:50 ` 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=1454340724.22112.219.camel@localhost.localdomain \
    --to=emilne@redhat.com \
    --cc=JBottomley@odin.com \
    --cc=QLogic-Storage-Upstream@qlogic.com \
    --cc=chad.dupuis@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mlombard@redhat.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