From patchwork Thu Mar 23 07:50:56 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: 73895 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2789595wrt; Thu, 23 Mar 2023 01:38:37 -0700 (PDT) X-Google-Smtp-Source: AK7set8wwzP+KYnV6zXWcK+8mGDffq+THUvxMKwAPEOfa2hmFHdbcuxwCgYYxXjgcFXRdxpPLy71 X-Received: by 2002:a17:902:f245:b0:19f:2fd5:10dd with SMTP id j5-20020a170902f24500b0019f2fd510ddmr4568825plc.24.1679560717622; Thu, 23 Mar 2023 01:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679560717; cv=none; d=google.com; s=arc-20160816; b=NwON5lOgRKGQYX2A9vcfWQweoXlKg1qMuFN7oOXBocAgu7Cql0iiyQD5f79abr4rsu f9QdxIWpX7jRtrC8/Qn65gWm0Ji1YYPIWDAaEBL9+ac1f71H4vOlR7JlLFnIOddEGWfN MS9HISVnc5QMUy/qZzy+HNhK0F+taFDJ8Qr8sa8jaNd/vDvO5whz9kN3eKL0ibzQG1dG 70Z3Mhq3X4nZYY10lMTcYiopc4R5/C1lypHyqkYEh9gGOJl9fk/DnWNvrI20ApknK4yk wRnOAqEABHx8iVGRR5qkrJYZSyikyPr7dUSSHW8hCau36NxDSWozxRLMDgSdUk59+hsY R8FA== 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=gvYNah7zg9mGMbnz41fVERm27kYlGkz/qSYJutdK0Wk=; b=Z/9WdSfyTd+sknh6dPlqfSGjEQRoYJU4NDIqjT9qppSG+DxdvV8UP7bAM+BG/fnp2f N5vvojZ/U5lo97XDbMaAxy84IRExJZ8XLYDzo0bUW30UUGVGYPKUyTTkH1Q0qv929yPc QarwmLFxBRKdL3OEowyTE6MoxKIdL7sk5sqZY4Wzz7+skWUw6laYb3zH27ssFrkWIcdV JSYgdZoHH1c4gNwiBQNBrs3QiWKYOinPjLLg5MvTsYUvbLKoyjyLj7RrbI4Pq4KPtrkf gcvt5xI5kWiN8UZ1ttNZQkM1dqIPTIaPfa4S/S+/icdS2Qhzq2XfD2HTfG88NWIoS0ex xDsg== 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 jd20-20020a170903261400b0019f24b937ffsi17496644plb.521.2023.03.23.01.38.24; Thu, 23 Mar 2023 01:38:37 -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 S231211AbjCWHvO (ORCPT + 99 others); Thu, 23 Mar 2023 03:51:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbjCWHvN (ORCPT ); Thu, 23 Mar 2023 03:51:13 -0400 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9392A1C5BA for ; Thu, 23 Mar 2023 00:51:12 -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 mxhk.zte.com.cn (FangMail) with ESMTPS id 4PhyFq2JT2z6FK2g; Thu, 23 Mar 2023 15:51:11 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 32N7orob099158; Thu, 23 Mar 2023 15:50:54 +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:50:56 +0800 (CST) Date: Thu, 23 Mar 2023 15:50:56 +0800 (CST) X-Zmail-TransId: 2afa641c04e0ffffffffe29-9500b X-Mailer: Zmail v1.0 Message-ID: <202303231550560132407@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , Subject: =?utf-8?q?=5BPATCH=5D_phy=3A_rockchip-typec=3A_Use_dev=5Ferr=5Fprob?= =?utf-8?q?e=28=29?= X-MAIL: mse-fl2.zte.com.cn 32N7orob099158 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641C04EF.000/4PhyFq2JT2z6FK2g 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?1761147058918291923?= X-GMAIL-MSGID: =?utf-8?q?1761147058918291923?= From: Ye Xingchen Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen --- drivers/phy/rockchip/phy-rockchip-typec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c index 8b1667be4915..c2e554e0a611 100644 --- a/drivers/phy/rockchip/phy-rockchip-typec.c +++ b/drivers/phy/rockchip/phy-rockchip-typec.c @@ -1153,9 +1153,8 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) if (PTR_ERR(tcphy->extcon) == -ENODEV) { tcphy->extcon = NULL; } else { - if (PTR_ERR(tcphy->extcon) != -EPROBE_DEFER) - dev_err(dev, "Invalid or missing extcon\n"); - return PTR_ERR(tcphy->extcon); + return dev_err_probe(dev, PTR_ERR(tcphy->extcon), + "Invalid or missing extcon\n"); } }