OSDN Git Service

usb: host: ehci-exynos: Handle return value of clk_prepare_enable
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 12 Jun 2017 11:15:14 +0000 (16:45 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Jun 2017 08:48:24 +0000 (10:48 +0200)
clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-exynos.c

index 7a603f6..26b6411 100644 (file)
@@ -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) {