Skip to contentSkip to conversation

PCI: brcmstb: Fix error return code in brcm_pcie_probe()

PATCH Applied 'Wei Yongjun 4 participants 4 messages Mar 8, 2021 – Mar 22, 2021

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: brcmstb: Fix error return code in brcm_pcie_probe()

From: Wei Yongjun <[email protected]>

Fix to return negative error code -ENODEV from the unsupported revision error handling case instead of 0, as done elsewhere in this function.

Fixes 0cdfaceb9889 ("PCI: brcmstb: support BCM4908 with external PERST# signal controller")
---
 drivers/pci/controller/pcie-brcmstb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/pcie-brcmstb.c +1 -0
index e330e6811f0b..69c999222cc8 100644
@@ -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;
 	}
 
Reviewed-by on v1 1/1
#1 lore raw

Hi,

[...]

drivers/pci/controller/pcie-brcmstb.c static int brcm_pcie_probe(struct platform_device *pdev) · line 1300

Quoted 4 lines
drivers/pci/controller/pcie-brcmstb.c +1 -0
 	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;

[...]

Nice catch!

Thank you!

Krzysztof

Acked-by on v1 1/1
#2 lore raw
In reply to 'Wei Yongjun
Quoted 8 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix to return negative error code -ENODEV from the unsupported revision error handling case instead of 0, as done elsewhere in this function.

Fixes 0cdfaceb9889 ("PCI: brcmstb: support BCM4908 with external PERST# signal controller")
Signature · 1 line
Florian