PCI: brcmstb: Fix error return code in brcm_pcie_probe()
Subsystems (6)
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.
--- drivers/pci/controller/pcie-brcmstb.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/controller/pcie-brcmstb.c +1 -0
@@ -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; }
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
-0if (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
Quoted 8 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fix to return negative error code
-ENODEVfrom 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")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
Signature · 1 line
Florian
Lorenzo Pieralisi
AppliedQuoted 2 lines · Wei Yongjun
Fix to return negative error code
-ENODEVfrom the unsupported revision error handling case instead of 0, as done elsewhere in this function.
Applied to pci/brcmstb, thanks!
[1/1] PCI: brcmstb: Fix error return code in brcm_pcie_probe()
https://git.kernel.org/lpieralisi/pci/c/b5d9209d50
Thanks,
Lorenzo