Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2335287ybb; Sat, 30 Mar 2019 02:29:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNWTX/up4eATjjzmQvXjCGphLNkpY8NL8PfiFR3cHSqYgUiGMZEyQ3VJJjNNAZ6++VKowU X-Received: by 2002:a65:60ca:: with SMTP id r10mr50545855pgv.429.1553938185349; Sat, 30 Mar 2019 02:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553938185; cv=none; d=google.com; s=arc-20160816; b=VxcNi9UwFDiHdSdAEEljgrbYZCOpE9HPIzgin/6a7Owx+C+ROLztrDgmk6ZvQtALEi 22wv0xzOjhlaJOZ/Glqbxyh1i8b32zZoEcMujOyCnedtU4B7X/zp8LlZP634H3V5ro61 msZZNJTVzCVg5zE4mRb+WDF0QS2okbHpTR4avnWqvUnfLuWJYCiS1lNazm3aVAaENycM ZG0D3yOpzwRPf6UuvB70DUE5tkW1cM0G5q3a8RGKjilPxTF3ssDdlGw2f2292ghFQs8M uxEUErQolBatK0NR0Gh1umnRAkJii2ATg8kKqlYYJ67g6ZVkP1dpvmhCpKIYGQEuQD8t lx8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=YFw6oP8hCbjK6NN5TYpDbQOoAKQG9t5/b5D6o4mjGJg=; b=Rzocuo3ghDVWr67V9xkgHV3Q0Im21U5b+Tai5Al+3j9+LEDojSrWUDsoQq+ozAsqmS KnCdXNeadjxP6I5iwz4d6fFjBOlDouR0utU6F+JvEa4ynsAhpog9sADA4/le/JD3kaAa YxUhHFK+rezaq2ZppGpmVhy7hlMuRQWrhFDmja13fM8cycc+t2bn0x+sFfeh3VpI3IV+ 735LVRcd+3aXQglkiYYrKTjVn9t6e71swAZthRJtTkLfdzOvFE4Zt6on4wZZFm7jLoJo s9bp9slG0R+SMAdmogxbc2dZYM1OOahd9xJb9j3UEkozud0fO4KPKLI2U5hypGoYw35c /GvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v25si3880268pfe.22.2019.03.30.02.29.27; Sat, 30 Mar 2019 02:29:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730594AbfC3J2o (ORCPT + 99 others); Sat, 30 Mar 2019 05:28:44 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:9398 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730372AbfC3J2k (ORCPT ); Sat, 30 Mar 2019 05:28:40 -0400 X-UUID: ecd17a923089409a8a0249dc810b0a73-20190330 X-UUID: ecd17a923089409a8a0249dc810b0a73-20190330 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1537852559; Sat, 30 Mar 2019 17:28:34 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 30 Mar 2019 17:28:32 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 30 Mar 2019 17:28:32 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman CC: Matthias Brugger , Chunfeng Yun , , , , , Minas Harutyunyan Subject: [PATCH 4/5] usb: dwc2: get optional clock by devm_clk_get_optional() Date: Sat, 30 Mar 2019 17:28:19 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <2ec86ffd7de45dabaa7257019a79f1e80751934c.1553937592.git.chunfeng.yun@mediatek.com> References: <2ec86ffd7de45dabaa7257019a79f1e80751934c.1553937592.git.chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_clk_get_optional() to get optional clock Cc: Minas Harutyunyan Signed-off-by: Chunfeng Yun --- 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 */ -- 2.20.1