From patchwork Thu Mar 23 07:47:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 666267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F889C6FD1D for ; Thu, 23 Mar 2023 07:47:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229734AbjCWHri (ORCPT ); Thu, 23 Mar 2023 03:47:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbjCWHrh (ORCPT ); Thu, 23 Mar 2023 03:47:37 -0400 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D49FE3BF; Thu, 23 Mar 2023 00:47:33 -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 4Phy9Z4wthz501Sl; Thu, 23 Mar 2023 15:47:30 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 32N7lBVN092219; Thu, 23 Mar 2023 15:47:11 +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:47:13 +0800 (CST) Date: Thu, 23 Mar 2023 15:47:13 +0800 (CST) X-Zmail-TransId: 2afa641c04011bd-8a3a9 X-Mailer: Zmail v1.0 Message-ID: <202303231547134442295@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , Subject: =?utf-8?b?W1BBVENIXSBwaHk6IHF1YWxjb21tOiBVc2UgZGV2X2Vycl9wcm9iZSgp?= X-MAIL: mse-fl2.zte.com.cn 32N7lBVN092219 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641C0412.003/4Phy9Z4wthz501Sl Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Ye Xingchen Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen --- drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c index d3e7d5e1d1b6..190f12247235 100644 --- a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c @@ -110,11 +110,8 @@ static int ipq4019_usb_phy_probe(struct platform_device *pdev) } phy->por_rst = devm_reset_control_get(phy->dev, "por_rst"); - if (IS_ERR(phy->por_rst)) { - if (PTR_ERR(phy->por_rst) != -EPROBE_DEFER) - dev_err(dev, "POR reset is missing\n"); - return PTR_ERR(phy->por_rst); - } + if (IS_ERR(phy->por_rst)) + return dev_err_probe(dev, PTR_ERR(phy->por_rst), "POR reset is missing\n"); phy->srif_rst = devm_reset_control_get_optional(phy->dev, "srif_rst"); if (IS_ERR(phy->srif_rst))