From: Arvind Yadav Date: Mon, 12 Jun 2017 11:15:14 +0000 (+0530) Subject: usb: host: ehci-exynos: Handle return value of clk_prepare_enable X-Git-Tag: v4.13-rc1~185^2~53 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=264ffb194a92df256b604d649faadfbd23a054e2;p=karo-tx-linux.git usb: host: ehci-exynos: Handle return value of clk_prepare_enable clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 7a603f66a9bc..26b641100639 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -279,7 +279,9 @@ static int exynos_ehci_resume(struct device *dev) struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); int ret; - clk_prepare_enable(exynos_ehci->clk); + ret = clk_prepare_enable(exynos_ehci->clk); + if (ret) + return ret; ret = exynos_ehci_phy_enable(dev); if (ret) {