From: Stefano Brivio Date: Wed, 6 Sep 2017 09:02:56 +0000 (+0200) Subject: scsi: lpfc: Don't return internal MBXERR_ERROR code from probe function X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84e35fd3c942c65affe7634ed69f978110695c21;p=pandora-kernel.git scsi: lpfc: Don't return internal MBXERR_ERROR code from probe function commit 5c756065e47dc3e84b00577bd109f0a8e69903d7 upstream. Internal error codes happen to be positive, thus the PCI driver core won't treat them as failure, but we do. This would cause a crash later on as lpfc_pci_remove_one() is called (e.g. as shutdown function). Fixes: 6d368e532168 ("[SCSI] lpfc 8.3.24: Add resource extent support") Signed-off-by: Stefano Brivio Reviewed-by: Johannes Thumshirn Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen [bwh: Backported to 3.2: adjust context, indentation] Signed-off-by: Ben Hutchings --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 1421ca3ea477..0fa2c205f00e 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4490,6 +4490,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) lpfc_printf_log(phba, KERN_ERR, LOG_INIT, "2999 Unsupported SLI4 Parameters " "Extents and RPI headers enabled.\n"); + rc = -EIO; goto out_free_bsmbx; } }