[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    scsi: lpfc: Don't return internal MBXERR_ERROR code from probe function
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2017-09-30 20:03:03
Message-ID: 20170930200303.797B421B3F () pdx-korg-gitolite-1 ! ci ! codeaurora ! org
[Download RAW message or body]

Web:        https://git.kernel.org/torvalds/c/5c756065e47dc3e84b00577bd109f0a8e69903d7
Commit:     5c756065e47dc3e84b00577bd109f0a8e69903d7
Parent:     6c92f7dbf25c36f35320e4ae0b508676410bac04
Refname:    refs/heads/master
Author:     Stefano Brivio <sbrivio@redhat.com>
AuthorDate: Wed Sep 6 11:02:56 2017 +0200
Committer:  Martin K. Petersen <martin.petersen@oracle.com>
CommitDate: Fri Sep 15 21:15:32 2017 -0400

    scsi: lpfc: Don't return internal MBXERR_ERROR code from probe function
    
    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 <sbrivio@redhat.com>
    Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
    Acked-by: Dick Kennedy <dick.kennedy@broadcom.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 7e7ae786121b..100bc4c8798d 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -6131,6 +6131,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
 				"Extents and RPI headers enabled.\n");
 		}
 		mempool_free(mboxq, phba->mbox_mem_pool);
+		rc = -EIO;
 		goto out_free_bsmbx;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic