From patchwork Thu Mar 23 07:45:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 73885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2780872wrt; Thu, 23 Mar 2023 01:11:16 -0700 (PDT) X-Google-Smtp-Source: AK7set9qxktZL6uXpYlw5JnIwaMbAxdjG1+ajEjTAsifcUt28evgmT5Blow5d6Qo8dCAr2mlUgXG X-Received: by 2002:a17:906:4f8b:b0:878:955e:b4a4 with SMTP id o11-20020a1709064f8b00b00878955eb4a4mr9147141eju.33.1679559076630; Thu, 23 Mar 2023 01:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679559076; cv=none; d=google.com; s=arc-20160816; b=L2ghpNOi9kVvyIgSsG7CVHRB+rzDKTdTBiaZ4Q1FC2TgYPb/JQd+/koroyMj3BcHNk EIDpiZDBwkm3XxWehMOGEVR5qhsmR4JL+Nb05ZNdClYOY3gQ8bKy94Zqk0jEUd+ZZNtv qgCCaO0P+D3t94tfdfee1Pz3kXjPN/6dwAaZCnHZjhu56iKjPo8s+JH9vHMBt0nPydKv Re3wMKE8qMjcZEg7CKVjiXXVBO/jGfvzgji0IbYPWftI9w/ddrH6pGtBY9iuA7uWf5H9 Lto1JSTuYtCnrU7qm3pC3Jra2S4Le6sNDt10RYsejCJz+JJSv0csu2wqFHvyyGotHXfi Al2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=yW93+2Bms9ofOxHY0DYgHoBMOaVfihYGVBbpInh+tH0=; b=k5d3Gx23/FbYoEuGbpQRMGYdFz/zr9nwRxSK5AUJ2Uu/GYkOQcNeuJXeJm6AcJtk4n voZBA3VE0EJHfBR65KKlo/gb0cX/+L8HTI6cRr7vyqEeP/1xkZ1V+nhU3PSIb8cKF1g9 uO8GCRXI2uziwjIgAdZzjX9pEYnXzG3vo9Iz6Qgb8nTeodhkl1YyEbplezEEfR7XHLQa mmtPxwcW+Y1MLsQ+oPjhXdz3fWFLRvuojvMNcz6zDn75Q/nn3cU7n1hxMtwG+eohQlha ZSqyD9G191qTAIjnWQRRJXm+z9vsdWda8O1Z8nVXPFDyn13t/mTf1MwI9krsnn+6T/rg Glaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k19-20020a170906159300b008b90d160acbsi16902011ejd.579.2023.03.23.01.10.53; Thu, 23 Mar 2023 01:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231269AbjCWHqc (ORCPT + 99 others); Thu, 23 Mar 2023 03:46:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbjCWHqX (ORCPT ); Thu, 23 Mar 2023 03:46:23 -0400 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A6602A6D7 for ; Thu, 23 Mar 2023 00:46:01 -0700 (PDT) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4Phy7q58x9z501Sn; Thu, 23 Mar 2023 15:45:59 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.97.17]) by mse-fl2.zte.com.cn with SMTP id 32N7joU5090489; Thu, 23 Mar 2023 15:45:50 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Thu, 23 Mar 2023 15:45:52 +0800 (CST) Date: Thu, 23 Mar 2023 15:45:52 +0800 (CST) X-Zmail-TransId: 2afa641c03b012f-8631f X-Mailer: Zmail v1.0 Message-ID: <202303231545522162256@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , Subject: =?utf-8?q?=5BPATCH=5D_phy=3A_omap-usb2-phy=3A_Use_dev=5Ferr=5Fprobe?= =?utf-8?q?=28=29?= X-MAIL: mse-fl2.zte.com.cn 32N7joU5090489 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641C03B7.001/4Phy7q58x9z501Sn X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761145338307731513?= X-GMAIL-MSGID: =?utf-8?q?1761145338307731513?= From: Ye Xingchen Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Acked-by: Uwe Kleine-König --- drivers/phy/ti/phy-omap-usb2.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c index bbe5d25b0351..762d3de8b3c5 100644 --- a/drivers/phy/ti/phy-omap-usb2.c +++ b/drivers/phy/ti/phy-omap-usb2.c @@ -445,11 +445,9 @@ static int omap_usb2_probe(struct platform_device *pdev) PTR_ERR(phy->wkupclk)); phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); - if (IS_ERR(phy->wkupclk)) { - if (PTR_ERR(phy->wkupclk) != -EPROBE_DEFER) - dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); - return PTR_ERR(phy->wkupclk); - } + if (IS_ERR(phy->wkupclk)) + return dev_err_probe(&pdev->dev, PTR_ERR(phy->wkupclk), + "unable to get usb_phy_cm_clk32k\n"); dev_warn(&pdev->dev, "found usb_phy_cm_clk32k, please fix DTS\n");