From: Dan Carpenter <dan.carpenter@oracle.com>
Subject: ipr: missing unlock before a return
Git-commit: d995e1b7c0e92af038d9ac322e35b3caaf905b10
Patch-mainline: yes
References: bnc#794550,fate#314040

    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>
Acked-by: Torsten Duwe <duwe@suse.de>

---
 drivers/scsi/ipr.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c	2012-12-07 11:16:07.975153669 -0600
+++ b/drivers/scsi/ipr.c	2012-12-07 11:16:20.696779407 -0600
@@ -5870,8 +5870,11 @@ static int ipr_queuecommand(struct Scsi_
 		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);
