From: Fabio Estevam Date: Sat, 22 Jul 2017 20:25:19 +0000 (-0300) Subject: PCI: armada8k: Check the return value from clk_prepare_enable() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e2e5d7bf9ba68e2ed0c70e10892472a8dd9ed9c2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Fabio Estevam Signed-off-by: Bjorn Helgaas Acked-by: Thomas Petazzoni --- diff --git a/drivers/pci/dwc/pcie-armada8k.c b/drivers/pci/dwc/pcie-armada8k.c index ea8f34af6a85..729722366c63 100644 --- a/drivers/pci/dwc/pcie-armada8k.c +++ b/drivers/pci/dwc/pcie-armada8k.c @@ -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");