phy_power_on() may fail, so we should better check its return value and propagate it in the error case. This fixes the following Coverity error: CID 1472841: Error handling issues (CHECKED_RETURN) Calling "phy_power_on" without checking return value (as is done elsewhere 40 out of 50 times). phy_power_on(ep->phy); phy_init(ep->phy); Reported-by: Bjorn Helgaas <helgaas@xxxxxxxxxx> Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx> --- drivers/pci/controller/dwc/pci-exynos.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c index c24dab383654..eabedc0529cb 100644 --- a/drivers/pci/controller/dwc/pci-exynos.c +++ b/drivers/pci/controller/dwc/pci-exynos.c @@ -254,13 +254,17 @@ static int exynos_pcie_host_init(struct pcie_port *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct exynos_pcie *ep = to_exynos_pcie(pci); + int ret; pp->bridge->ops = &exynos_pci_ops; exynos_pcie_assert_core_reset(ep); phy_reset(ep->phy); - phy_power_on(ep->phy); + ret = phy_power_on(ep->phy); + if (ret < 0) + return ret; + phy_init(ep->phy); exynos_pcie_deassert_core_reset(ep); -- 2.25.1