[SCSI] ipr: missing unlock before a return
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 30 Jul 2012 08:16:35 +0000 (11:16 +0300)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 14 Sep 2012 11:02:17 +0000 (12:02 +0100)
We recently changed the locking in this function, but this return was
missed.  It needs an unlock and the IRQs need to be restored.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/ipr.c

index 07b14ba6906ab53578fc5c1a28d2b0464ec68b83..7a5ccb2c15657b4bcbc8fe6bede90781e3ca1a49 100644 (file)
@@ -5874,8 +5874,11 @@ static int ipr_queuecommand(struct Scsi_Host *shost,
                goto err_nodev;
        }
 
-       if (ipr_is_gata(res) && res->sata_port)
-               return ata_sas_queuecmd(scsi_cmd, res->sata_port->ap);
+       if (ipr_is_gata(res) && res->sata_port) {
+               rc = ata_sas_queuecmd(scsi_cmd, res->sata_port->ap);
+               spin_unlock_irqrestore(shost->host_lock, lock_flags);
+               return rc;
+       }
 
        ipr_cmd = __ipr_get_free_ipr_cmnd(ioa_cfg);
        spin_unlock_irqrestore(shost->host_lock, lock_flags);