]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2fc: bnx2fc_eh_abort(): fix wrong return code.
authorMaurizio Lombardi <mlombard@redhat.com>
Mon, 1 Feb 2016 15:08:45 +0000 (16:08 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 12 Dec 2016 01:49:01 +0000 (17:49 -0800)
Orabug: 24011326

If the link is not ready, the bnx2fc_eh_abort() function should return
FAILED.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/scsi/bnx2fc/bnx2fc_io.c

index 3b4e00ac6a93d64970cd382282c119fad0e92ea7..cd616f0964b8410b7eedb61bdc6c3f02814c3ab4 100644 (file)
@@ -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];