From: Maurizio Lombardi Date: Mon, 1 Feb 2016 15:08:45 +0000 (+0100) Subject: bnx2fc: bnx2fc_eh_abort(): fix wrong return code. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=617757de4274b52761bfc9327aee6bcd5941999c;p=linux-beck.git bnx2fc: bnx2fc_eh_abort(): fix wrong return code. If the link is not ready, the bnx2fc_eh_abort() function should return FAILED. Signed-off-by: Maurizio Lombardi Reviewed-by: Ewan Milne Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 0002caf687dd..2230dab67ca5 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];