Skip to content

Commit

Permalink
scsi: qlogicpti: Fix an error handling path in 'qpti_sbus_probe()'
Browse files Browse the repository at this point in the history
The 'free_irq()' call is not at the right place in the error handling
path.  The changed order has been introduced in commit 3d4253d
("[SCSI] qlogicpti: Convert to new SBUS device framework.")

Fixes: 3d4253d ("[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>
  • Loading branch information
Christophe Jaillet authored and Martin K. Petersen committed May 18, 2018
1 parent 10e5e37 commit 51b910c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/scsi/qlogicpti.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,16 +1385,16 @@ static int qpti_sbus_probe(struct platform_device *op)
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]));
if (qpti->is_pti)
of_iounmap(&op->resource[0], qpti->sreg,
sizeof(unsigned char));

fail_free_irq:
free_irq(qpti->irq, qpti);

fail_unlink:
scsi_host_put(host);

Expand Down

0 comments on commit 51b910c

Please sign in to comment.