diff mbox series

[v2,6/6] PCI: brcmstb: check return value of clk_prepare_enable()

Message ID 20201130211145.3012-7-james.quinlan@broadcom.com (mailing list archive)
State New, archived
Headers show
Series brcmstb: add EP regulators and panic handler | expand

Commit Message

Jim Quinlan Nov. 30, 2020, 9:11 p.m. UTC
The check was missing on PCIe resume.

Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
---
 drivers/pci/controller/pcie-brcmstb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Florian Fainelli Nov. 30, 2020, 9:24 p.m. UTC | #1
On 11/30/2020 1:11 PM, Jim Quinlan wrote:
> The check was missing on PCIe resume.
> 
> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Fixes: 8195b7417018 ("PCI: brcmstb: Add suspend and resume pm_ops")
diff mbox series

Patch

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 3983d6c80769..64cf534e44d0 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1344,7 +1344,9 @@  static int brcm_pcie_resume(struct device *dev)
 
 	base = pcie->base;
 	brcm_set_regulators(pcie, TURN_ON);
-	clk_prepare_enable(pcie->clk);
+	ret = clk_prepare_enable(pcie->clk);
+	if (ret)
+		return ret;
 
 	ret = brcm_phy_start(pcie);
 	if (ret)