* [PATCH] usb: host: ehci-exynos: Handle return value of clk_prepare_enable
@ 2017-06-12 11:15 Arvind Yadav
2017-06-12 12:02 ` Krzysztof Kozlowski
2017-06-12 14:09 ` Alan Stern
0 siblings, 2 replies; 3+ messages in thread
From: Arvind Yadav @ 2017-06-12 11:15 UTC (permalink / raw)
To: linux-arm-kernel
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.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) {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] usb: host: ehci-exynos: Handle return value of clk_prepare_enable
2017-06-12 11:15 [PATCH] usb: host: ehci-exynos: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-06-12 12:02 ` Krzysztof Kozlowski
2017-06-12 14:09 ` Alan Stern
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-12 12:02 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 12, 2017 at 04:45:14PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/usb/host/ehci-exynos.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] usb: host: ehci-exynos: Handle return value of clk_prepare_enable
2017-06-12 11:15 [PATCH] usb: host: ehci-exynos: Handle return value of clk_prepare_enable Arvind Yadav
2017-06-12 12:02 ` Krzysztof Kozlowski
@ 2017-06-12 14:09 ` Alan Stern
1 sibling, 0 replies; 3+ messages in thread
From: Alan Stern @ 2017-06-12 14:09 UTC (permalink / raw)
To: linux-arm-kernel
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@gmail.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@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-12 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 11:15 [PATCH] usb: host: ehci-exynos: Handle return value of clk_prepare_enable Arvind Yadav
2017-06-12 12:02 ` Krzysztof Kozlowski
2017-06-12 14:09 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox