OSDN Git Service

scsi: lpfc: Fix upcall to bsg done in non-success cases
authorJames Smart <jsmart2021@gmail.com>
Wed, 14 Aug 2019 23:56:59 +0000 (16:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 02:41:11 +0000 (22:41 -0400)
commit6db51abb8dc3919b85c5d2afd35b3871399e8a81
tree761d4218042974a2bf209e4b09e756a08dd24bec
parent07b1b91412c801030752da3d32a543c5522a79d6
scsi: lpfc: Fix upcall to bsg done in non-success cases

The scsi transport fc bsg interface does not expect the bsg_job_done()
callback to be done if the bsg request call returns failure. Several of the
HST_VENDOR cases in the driver unconditionally call bsg_job_done()
regardless of the returning value.

Fix the code to only call bsg_job_done() if the call to lpfc_bsg_request()
will return success.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_bsg.c