[PATCH -next] PCI: brcmstb: Fix error return code in brcm_pcie_probe()
Subsystems:
broadcom bcm2711/bcm2835 arm architecture , broadcom bcm7xxx arm architecture , broadcom stb pcie driver , pci native host bridge and endpoint drivers , pci subsystem , the rest
STALE1957d
LANDED
Landed in mainline as b5d9209d5083 on 2021-03-22.
4 messages,
4 authors,
2021-03-22
· open the first message on its own page
From: Wei Yongjun <redacted>
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")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wei Yongjun <redacted>
---
drivers/pci/controller/pcie-brcmstb.c | 1 +
1 file changed, 1 insertion(+)
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 ;
}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi,
[...] 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!
Reviewed-by: Krzysztof Wilczyński <redacted>
Thank you!
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On 3/8/2021 5:56 AM, 'Wei Yongjun wrote: From: Wei Yongjun <redacted>
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")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wei Yongjun <redacted>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Mon, 8 Mar 2021 13:56:19 +0000, 'Wei Yongjun wrote: Fix to return negative error code -ENODEV from 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel