Message ID | 39be1493f7760c3c06858046f64d02e7cb86884e.1555488276.git.chunfeng.yun@mediatek.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 60722c4eefbc9acddaf5e641f6dfb24bce930f9a |
Headers | show |
Series | [v3,1/6] usb: xhci-mtk: get optional clock by devm_clk_get_optional() | expand |
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 */