[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <410670D7E743164D87FA6160E7907A56013A7FDF13@am04wembxa.internal.synopsys.com>
Date: Mon, 1 Apr 2019 08:47:47 +0000
From: Minas Harutyunyan <minas.harutyunyan@...opsys.com>
To: Chunfeng Yun <chunfeng.yun@...iatek.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Matthias Brugger <matthias.bgg@...il.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
Minas Harutyunyan <minas.harutyunyan@...opsys.com>
Subject: Re: [PATCH 4/5] usb: dwc2: get optional clock by
devm_clk_get_optional()
On 3/30/2019 1:28 PM, Chunfeng Yun wrote:
> Use devm_clk_get_optional() to get optional clock
>
> Cc: Minas Harutyunyan <hminas@...opsys.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@...iatek.com>
Acked-by: Minas Harutyunyan <hminas@...opsys.com>
> ---
> drivers/usb/dwc2/platform.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index c0b64d483552..9aa9682a5cd2 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -284,10 +284,10 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg *hsotg)
> }
>
> /* Clock */
> - hsotg->clk = devm_clk_get(hsotg->dev, "otg");
> + hsotg->clk = devm_clk_get_optional(hsotg->dev, "otg");
> if (IS_ERR(hsotg->clk)) {
> - hsotg->clk = NULL;
> - dev_dbg(hsotg->dev, "cannot get otg clock\n");
> + dev_err(hsotg->dev, "cannot get otg clock\n");
> + return PTR_ERR(hsotg->clk);
> }
>
> /* Regulators */
>
Powered by blists - more mailing lists