[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1706121008340.2092-100000@iolanthe.rowland.org>
Date: Mon, 12 Jun 2017 10:09:39 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Arvind Yadav <arvind.yadav.cs@...il.com>
cc: kgene@...nel.org, <krzk@...nel.org>, <javier@....samsung.com>,
<gregkh@...uxfoundation.org>, <linux-usb@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-samsung-soc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: host: ehci-exynos: Handle return value of
clk_prepare_enable
On Mon, 12 Jun 2017, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
> ---
> drivers/usb/host/ehci-exynos.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
> index 7a603f6..26b6411 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) {
Acked-by: Alan Stern <stern@...land.harvard.edu>
Powered by blists - more mailing lists