diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-03-08 14:56:19 +0100 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2021-03-22 18:48:52 +0100 |
commit | b5d9209d50838474fc1b2901d0e11bba59906428 (patch) | |
tree | 64146cffcf8e2759648422fe81cd81cc83c88222 /drivers | |
parent | Linux 5.12-rc2 (diff) | |
download | linux-b5d9209d50838474fc1b2901d0e11bba59906428.tar.xz linux-b5d9209d50838474fc1b2901d0e11bba59906428.zip |
PCI: brcmstb: Fix error return code in brcm_pcie_probe()
Fix to return negative error code -ENODEV from the unsupported revision
error handling case instead of 0, as done elsewhere in this function.
Link: https://lore.kernel.org/r/20210308135619.19133-1-weiyongjun1@huawei.com
Fixes: 0cdfaceb9889 ("PCI: brcmstb: support BCM4908 with external PERST# signal controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Krzysztof WilczyĆski <kw@linux.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/controller/pcie-brcmstb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index e330e6811f0b..69c999222cc8 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1296,6 +1296,7 @@ static int brcm_pcie_probe(struct platform_device *pdev) pcie->hw_rev = readl(pcie->base + PCIE_MISC_REVISION); if (pcie->type == BCM4908 && pcie->hw_rev >= BRCM_PCIE_HW_REV_3_20) { dev_err(pcie->dev, "hardware revision with unsupported PERST# setup\n"); + ret = -ENODEV; goto fail; } |