]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
scsi: bfa: Fix error return in bfad_pci_init()
authorJing Xiangfeng <jingxiangfeng@huawei.com>
Fri, 25 Sep 2020 06:24:23 +0000 (14:24 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:49:04 +0000 (14:49 +0100)
BugLink: https://bugs.launchpad.net/bugs/1902115
[ Upstream commit f0f6c3a4fcb80fcbcce4ff6739996dd98c228afd ]

Fix to return error code -ENODEV from the error handling case instead of 0.

Link: https://lore.kernel.org/r/20200925062423.161504-1-jingxiangfeng@huawei.com
Fixes: 11ea3824140c ("scsi: bfa: fix calls to dma_set_mask_and_coherent()")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/scsi/bfa/bfad.c

index 2f9213b257a4a231854e4d3043774647951187e4..93e4011809919bb3791783b9036bdf0fa1eea373 100644 (file)
@@ -749,6 +749,7 @@ bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
 
        if (bfad->pci_bar0_kva == NULL) {
                printk(KERN_ERR "Fail to map bar0\n");
+               rc = -ENODEV;
                goto out_release_region;
        }