OSDN Git Service

scsi: lpfc: Fix error codes in lpfc_sli4_pci_mem_setup()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Mar 2019 05:33:44 +0000 (08:33 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Mar 2019 11:01:36 +0000 (07:01 -0400)
commit3a487ff78c4b2bf5686dbb29178cfd78b3eed053
tree04a80d647471e8ec727fa5b23007d9b7122d2233
parenta656183e6c58a3a4d818278afab522b30a17014c
scsi: lpfc: Fix error codes in lpfc_sli4_pci_mem_setup()

It used to be that "error" was set to -ENODEV at the start of the function
but we shifted some code around an now "error" is set to zero for most
error paths.  There is a mix of direct returns and "goto out" but I changed
everything to direct returns for consistency.

Fixes: 56de8357049c ("scsi: lpfc: fix calls to dma_set_mask_and_coherent()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: James SmartĀ  <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c