]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: qlogicpti: Fix an error handling path in 'qpti_sbus_probe()'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Thu, 10 May 2018 11:45:58 +0000 (13:45 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 16:22:48 +0000 (12:22 -0400)
The 'free_irq()' call is not at the right place in the error handling
path.  The changed order has been introduced in commit 3d4253d9afab
("[SCSI] qlogicpti: Convert to new SBUS device framework.")

Fixes: 3d4253d9afab ("[SCSI] qlogicpti: Convert to new SBUS device framework.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qlogicpti.c

index cec9a14982e6a3720afaf18633a8f39314a0c1e0..8578e566ab4115e79bd2d10ff2a90f5de6671c6f 100644 (file)
@@ -1385,6 +1385,9 @@ fail_unmap_queues:
                          qpti->req_cpu, qpti->req_dvma);
 #undef QSIZE
 
+fail_free_irq:
+       free_irq(qpti->irq, qpti);
+
 fail_unmap_regs:
        of_iounmap(&op->resource[0], qpti->qregs,
                   resource_size(&op->resource[0]));
@@ -1392,9 +1395,6 @@ fail_unmap_regs:
                of_iounmap(&op->resource[0], qpti->sreg,
                           sizeof(unsigned char));
 
-fail_free_irq:
-       free_irq(qpti->irq, qpti);
-
 fail_unlink:
        scsi_host_put(host);