Commit e2e5d7bf authored by Fabio Estevam's avatar Fabio Estevam Committed by Bjorn Helgaas

PCI: armada8k: Check the return value from clk_prepare_enable()

clk_prepare_enable() may fail, so check its return value and propagate it
in the case of error.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 16f73eb0
......@@ -226,7 +226,9 @@ static int armada8k_pcie_probe(struct platform_device *pdev)
if (IS_ERR(pcie->clk))
return PTR_ERR(pcie->clk);
clk_prepare_enable(pcie->clk);
ret = clk_prepare_enable(pcie->clk);
if (ret)
return ret;
/* Get the dw-pcie unit configuration/control registers base. */
base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment