scsi: qedf: Add missing return in qedf_scsi_done()
authorChad Dupuis <cdupuis@marvell.com>
Tue, 26 Mar 2019 07:38:48 +0000 (00:38 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Mar 2019 01:54:53 +0000 (21:54 -0400)
On completions where we do not have a bad scsi_cmnd pointer we should
return before the the label lest we do a double kref_put.

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_io.c

index 8d09cf3fe49b4150a7f272dd55319315865c7979..57c3aa4fb708de7aa57983a3978c269a96ce3dbf 100644 (file)
@@ -1392,6 +1392,7 @@ void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req,
        sc_cmd->SCp.ptr = NULL;
        sc_cmd->scsi_done(sc_cmd);
        kref_put(&io_req->refcount, qedf_release_cmd);
+       return;
 
 bad_scsi_ptr:
        /*