Re: [PATCH v1] PCI: brcmstb: fix error return paths in probe()

2020-10-08 Thread Nicolas Saenz Julienne
On Thu, 2020-10-01 at 11:18 -0400, Jim Quinlan wrote:
> Fixes two cases where we were returning without calling
> clk_disable_unprepare().  Although there is a common place to go on probe()
> errors (the 'fail' label), one can only jump there after executing
> brcm_pcie_setup(), so we have to add clk_disable_unprepare() calls to the
> two error paths.
> 
> Fixes: b98f52bc6495 ("PCI: brcmstb: Add control of rescal reset")
> Reported-by: kernel test robot 
> Reported-by: Dan Carpenter 
> Signed-off-by: Jim Quinlan 
> ---

Reviewed-by: Nicolas Saenz Julienne 

Thanks!




Re: [PATCH v1] PCI: brcmstb: fix error return paths in probe()

2020-10-01 Thread Florian Fainelli




On 10/1/2020 8:18 AM, Jim Quinlan wrote:

Fixes two cases where we were returning without calling
clk_disable_unprepare().  Although there is a common place to go on probe()
errors (the 'fail' label), one can only jump there after executing
brcm_pcie_setup(), so we have to add clk_disable_unprepare() calls to the
two error paths.

Fixes: b98f52bc6495 ("PCI: brcmstb: Add control of rescal reset")
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 
Signed-off-by: Jim Quinlan 


Acked-by: Florian Fainelli 
--
Florian


[PATCH v1] PCI: brcmstb: fix error return paths in probe()

2020-10-01 Thread Jim Quinlan
Fixes two cases where we were returning without calling
clk_disable_unprepare().  Although there is a common place to go on probe()
errors (the 'fail' label), one can only jump there after executing
brcm_pcie_setup(), so we have to add clk_disable_unprepare() calls to the
two error paths.

Fixes: b98f52bc6495 ("PCI: brcmstb: Add control of rescal reset")
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 
Signed-off-by: Jim Quinlan 
---
 drivers/pci/controller/pcie-brcmstb.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-brcmstb.c 
b/drivers/pci/controller/pcie-brcmstb.c
index 6e7aa82a54a3..da2fefe80d47 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1269,8 +1269,10 @@ static int brcm_pcie_probe(struct platform_device *pdev)
return ret;
}
pcie->rescal = devm_reset_control_get_optional_shared(>dev, 
"rescal");
-   if (IS_ERR(pcie->rescal))
+   if (IS_ERR(pcie->rescal)) {
+   clk_disable_unprepare(pcie->clk);
return PTR_ERR(pcie->rescal);
+   }
 
ret = reset_control_deassert(pcie->rescal);
if (ret)
@@ -1279,6 +1281,7 @@ static int brcm_pcie_probe(struct platform_device *pdev)
ret = brcm_phy_start(pcie);
if (ret) {
reset_control_assert(pcie->rescal);
+   clk_disable_unprepare(pcie->clk);
return ret;
}
 
-- 
2.17.1



smime.p7s
Description: S/MIME Cryptographic Signature