From patchwork Wed Apr 2 11:42:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shao.mingyin@zte.com.cn X-Patchwork-Id: 14035823 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E9BB2AEE9; Wed, 2 Apr 2025 11:42:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.216.63.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594131; cv=none; b=pWxUjAlunP3jyScTc+SpMbBm8/reZ6kKrcfn0TgmXwbq9uDBiBQqqKEAgEoQumd7RqMosXFmg7te3qinYQPsxigIgWqSVqzftF5vmKcmWHKhTdCM9pfl/7z5SYoBOkVpFWdsNzYZzyK4x7vMr+WwXZoCzhuXjRoYl3Hro3RDu9Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594131; c=relaxed/simple; bh=Zv5dbReFel/EO6cMf8sg7s7FyaAfk1JbfOgKVejN9G0=; h=Date:Message-ID:In-Reply-To:References:Mime-Version:From:To:Cc: Subject:Content-Type; b=INzm4etnZZ0bPEhdFw3j6QubV/2DWFNcfRQbfmOQlh87DQ/YaSzfDsuE9ZaAYM2ki7UQ58QdXDpXJDA4f/zs/jdMK/iQVNLISkhk7hqmT9zsGYH9aBwPCryKL4p2ogSsKfRkwWSrSaq/x0DyeBC9PwevXaNQFgSvKgz9lPrkoWk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=63.216.63.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4ZSNJD3hjJz8R040; Wed, 2 Apr 2025 19:42:04 +0800 (CST) Received: from xaxapp04.zte.com.cn ([10.99.98.157]) by mse-fl1.zte.com.cn with SMTP id 532BfxoZ067902; Wed, 2 Apr 2025 19:41:59 +0800 (+08) (envelope-from shao.mingyin@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid32; Wed, 2 Apr 2025 19:42:03 +0800 (CST) Date: Wed, 2 Apr 2025 19:42:03 +0800 (CST) X-Zmail-TransId: 2af967ed228b33d-29c29 X-Mailer: Zmail v1.0 Message-ID: <20250402194203426goMMzm9R9_yQBb7SMNGj1@zte.com.cn> In-Reply-To: <20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn> References: 20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , Cc: , , , , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next_1/5=5D_phy=3A_allwinner=3A_phy-sun50i?= =?utf-8?q?-usb3=3A_Use=C2=A0dev=5Ferr=5Fprobe=28=29?= X-MAIL: mse-fl1.zte.com.cn 532BfxoZ067902 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 67ED228C.001/4ZSNJD3hjJz8R040 From: Zhang Enpei Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin Acked-by: Jernej Skrabec --- drivers/phy/allwinner/phy-sun50i-usb3.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c index 363f9a0df503..b03faffc160d 100644 --- a/drivers/phy/allwinner/phy-sun50i-usb3.c +++ b/drivers/phy/allwinner/phy-sun50i-usb3.c @@ -141,11 +141,9 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev) return -ENOMEM; phy->clk = devm_clk_get(dev, NULL); - if (IS_ERR(phy->clk)) { - if (PTR_ERR(phy->clk) != -EPROBE_DEFER) - dev_err(dev, "failed to get phy clock\n"); - return PTR_ERR(phy->clk); - } + if (IS_ERR(phy->clk)) + return dev_err_probe(dev, PTR_ERR(phy->clk), + "failed to get phy clock\n"); phy->reset = devm_reset_control_get(dev, NULL); if (IS_ERR(phy->reset)) { From patchwork Wed Apr 2 11:43:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shao.mingyin@zte.com.cn X-Patchwork-Id: 14035831 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49EDF23875A; Wed, 2 Apr 2025 11:43:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.216.63.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594208; cv=none; b=WaNmrygUya9s0hrR0ISMFkL/JoYldNKTWXUVUjc5C3o6iwZeyBL/QJWeBMYpdZW0vbYxSThHkVgehDXNjSRwZ9Y1Wa3B7GjPR+WOiijAdqrpltOr62PAlfqyac8e6H8hLV8HN+VdoFU619LAu9BeEB/Ke9JQ/VydsApnqe12vj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594208; c=relaxed/simple; bh=Wgqp5CEb0vSe5kauJHqhAOn3abMfSbPpqSVemJyahHk=; h=Date:Message-ID:In-Reply-To:References:Mime-Version:From:To:Cc: Subject:Content-Type; b=K8cjTWRq6SZQ62nutjz4Io+BlnXkWaxg4ja8WunwXM1luAfQUi7iU5LMehpVrneKcLNlkXeBk0eIpatBlfNo61mryhRyrHyTOYrv/cvM8rHix6oYmVFLev7/sXtjvBpDe7uoMsmfh4ktt/dqpl08s3iOMHKUneFQXN+8Y+PQ2F0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=63.216.63.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4ZSNKh4Gvnz8R044; Wed, 2 Apr 2025 19:43:20 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl1.zte.com.cn with SMTP id 532Bh1AM068443; Wed, 2 Apr 2025 19:43:01 +0800 (+08) (envelope-from shao.mingyin@zte.com.cn) Received: from mapi (xaxapp04[null]) by mapi (Zmail) with MAPI id mid32; Wed, 2 Apr 2025 19:43:03 +0800 (CST) Date: Wed, 2 Apr 2025 19:43:03 +0800 (CST) X-Zmail-TransId: 2afb67ed22c75b0-20ea5 X-Mailer: Zmail v1.0 Message-ID: <20250402194303339EE86jtSNtWFpLPkS6WiQh@zte.com.cn> In-Reply-To: <20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn> References: 20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , Cc: , , , , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next_2/5=5D_phy=3A_broadcom=3A_phy-bcm63xx?= =?utf-8?q?-usbh=3A_Use=C2=A0dev=5Ferr=5Fprobe=28=29?= X-MAIL: mse-fl1.zte.com.cn 532Bh1AM068443 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 67ED22D8.003/4ZSNKh4Gvnz8R044 From: Zhang Enpei Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin --- drivers/phy/broadcom/phy-bcm63xx-usbh.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/broadcom/phy-bcm63xx-usbh.c b/drivers/phy/broadcom/phy-bcm63xx-usbh.c index 647644de041b..b9e7f750567c 100644 --- a/drivers/phy/broadcom/phy-bcm63xx-usbh.c +++ b/drivers/phy/broadcom/phy-bcm63xx-usbh.c @@ -397,11 +397,9 @@ static int __init bcm63xx_usbh_phy_probe(struct platform_device *pdev) return PTR_ERR(usbh->base); usbh->reset = devm_reset_control_get_exclusive(dev, NULL); - if (IS_ERR(usbh->reset)) { - if (PTR_ERR(usbh->reset) != -EPROBE_DEFER) - dev_err(dev, "failed to get reset\n"); - return PTR_ERR(usbh->reset); - } + if (IS_ERR(usbh->reset)) + return dev_err_probe(dev, PTR_ERR(usbh->reset), + "failed to get reset\n"); usbh->usbh_clk = devm_clk_get_optional(dev, "usbh"); if (IS_ERR(usbh->usbh_clk)) From patchwork Wed Apr 2 11:43:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shao.mingyin@zte.com.cn X-Patchwork-Id: 14035832 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C99B3236451; Wed, 2 Apr 2025 11:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.216.63.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594257; cv=none; b=cgl4KRJdHt4be4+q9ITUdYV7v07SKDi61XNkyn94jrJJJSRZnqLDsw09WpF7baIQ7BVVx67po714A0E/eX/Bs26OAjc3i1imc3dzUuFQzzv1dnAWsk48Us/vH7FyTecB/n/zLGEErfdVVa5+fZCLPOA+9Gu8xoYudnMEyYPzuDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594257; c=relaxed/simple; bh=Z0NePWjC0usRfphBp4RYVUXKLMLWOyek6WqP11WZt3M=; h=Date:Message-ID:In-Reply-To:References:Mime-Version:From:To:Cc: Subject:Content-Type; b=g3L1AwUYlngreUDV0Uudi18eTyxVdHKgzIkCPWLaUOi6oHmR9LvvgZI/r0xRVkm1Xm50LtoXaaCE+f43Fi6CquZe412/D8NoEJiOl5xp3Nff9G9XwHehY4Asb9TYyYdjPacqTL4G+ydViGYzJoMFgtpGWULNTD3dDCB9eItIz0I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=63.216.63.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn 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 4ZSNLk0g6Rz5B1Jd; Wed, 2 Apr 2025 19:44:14 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 532BhsZv019636; Wed, 2 Apr 2025 19:43:54 +0800 (+08) (envelope-from shao.mingyin@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid32; Wed, 2 Apr 2025 19:43:57 +0800 (CST) Date: Wed, 2 Apr 2025 19:43:57 +0800 (CST) X-Zmail-TransId: 2af967ed22fd046-2b930 X-Mailer: Zmail v1.0 Message-ID: <20250402194357404aoSxd3G74tojxA7uCZXiy@zte.com.cn> In-Reply-To: <20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn> References: 20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , Cc: , , , , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next_3/5=5D_phy=3A_qualcomm=3A_phy-qcom-ip?= =?utf-8?q?q4019-usb=3A_Use=C2=A0dev=5Ferr=5Fprobe=28=29?= X-MAIL: mse-fl2.zte.com.cn 532BhsZv019636 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 67ED230E.000/4ZSNLk0g6Rz5B1Jd From: Zhang Enpei Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c index da6f290af722..738b3015747f 100644 --- a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c @@ -109,11 +109,9 @@ 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)) From patchwork Wed Apr 2 11:44:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shao.mingyin@zte.com.cn X-Patchwork-Id: 14035833 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7193802; Wed, 2 Apr 2025 11:44:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=183.62.165.209 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594289; cv=none; b=r6hXqXQfcDZXqVJWOZamcHJncyn6Qkf2IM6GVHRtJ41l4bMqY4elYYi7Ual8T1Ppqd1UouYR5qI3d2JsEPJbXv1yRanjJxatallnUwX1tXzT1VelQIopdNZ8j8FP5G4nqmJ8G7bIz7dGB1PooqAj3Jc7lxKTex4lBCb7IkSfOH8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594289; c=relaxed/simple; bh=wmvOiXf3WnAWRLZDLUoaSymBeRBwXXVzJpfjdlZEBS0=; h=Date:Message-ID:In-Reply-To:References:Mime-Version:From:To:Cc: Subject:Content-Type; b=C++Ox22DW1igFg5yiH+Ij5Kt1PQvbNgcafGS2vvvEk3mcw+WB1uj3ndcTo8iCxg7X+HB+0piBIpbf7nzzc4ipScW4jwc/SYlhowXa/u/nPN9NFZfGHjeTd6PiDX3MnMtq98mFsqlRiiJzqgkfbGmsn8iJ+t6oD8L6aPpwOgV7q4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=183.62.165.209 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4ZSNMG2x1sz4x5ph; Wed, 2 Apr 2025 19:44:42 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl1.zte.com.cn with SMTP id 532Bidbx069351; Wed, 2 Apr 2025 19:44:39 +0800 (+08) (envelope-from shao.mingyin@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid32; Wed, 2 Apr 2025 19:44:42 +0800 (CST) Date: Wed, 2 Apr 2025 19:44:42 +0800 (CST) X-Zmail-TransId: 2afa67ed232a199-28a86 X-Mailer: Zmail v1.0 Message-ID: <20250402194442934NKPLNa40VjBaWDWKBGi8l@zte.com.cn> In-Reply-To: <20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn> References: 20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , Cc: , , , , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next_4/5=5D_phy=3A_lantiq=3A_phy-lantiq-rc?= =?utf-8?q?u-usb2=3A_Use=C2=A0dev=5Ferr=5Fprobe=28=29?= X-MAIL: mse-fl1.zte.com.cn 532Bidbx069351 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 67ED232A.001/4ZSNMG2x1sz4x5ph From: Zhang Enpei Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin --- drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c b/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c index 82f1ffc0b0ad..7e4e42d62dbc 100644 --- a/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c +++ b/drivers/phy/lantiq/phy-lantiq-rcu-usb2.c @@ -192,11 +192,9 @@ static int ltq_rcu_usb2_of_parse(struct ltq_rcu_usb2_priv *priv, } priv->ctrl_reset = devm_reset_control_get_shared(dev, "ctrl"); - if (IS_ERR(priv->ctrl_reset)) { - if (PTR_ERR(priv->ctrl_reset) != -EPROBE_DEFER) - dev_err(dev, "failed to get 'ctrl' reset\n"); - return PTR_ERR(priv->ctrl_reset); - } + if (IS_ERR(priv->ctrl_reset)) + return dev_err_probe(dev, PTR_ERR(priv->ctrl_reset), + "failed to get 'ctrl' reset\n"); priv->phy_reset = devm_reset_control_get_optional(dev, "phy"); From patchwork Wed Apr 2 11:45:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shao.mingyin@zte.com.cn X-Patchwork-Id: 14035834 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32334233153; Wed, 2 Apr 2025 11:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.216.63.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594349; cv=none; b=P/RLzwjF1rvT93eLJa0GfUxfolA8UmQnj8GpgzzWYruMwAzzO91l8kXhg6oPdq0ULGbCQanR1Mw2IYW5ZcbaAXxWPYC5Q+RU/S3a9RHjM2mefaYSZG/GhK8TwOPCaZtFBS4yTitme2dffs3EIqqzt/ITm02XPmfOEcl9uCbcNu4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743594349; c=relaxed/simple; bh=1FEXNb+3sgwnhrzy3P2QhZYbooTBMvl6WNcpdOtLPqc=; h=Date:Message-ID:In-Reply-To:References:Mime-Version:From:To:Cc: Subject:Content-Type; b=QsLc6x1Zxw9FmyUVRjyCLAQipLmh9EqOUpuB3K49i+fPNBJOtD+GvwFs77sIuJTzb7C4WFyh84pXrmPVKV/gkT+HtHyvyKjkH+lHXiHbgltC5K8IPLA1HuRFqtbgwM0ltuR6ZRzYWWxVMBtWu6DU/4kYUqMwiizF+TQrPybpq3U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=63.216.63.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4ZSNNR0FSrz8QrkZ; Wed, 2 Apr 2025 19:45:43 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl1.zte.com.cn with SMTP id 532Bjd3j070014; Wed, 2 Apr 2025 19:45:39 +0800 (+08) (envelope-from shao.mingyin@zte.com.cn) Received: from mapi (xaxapp04[null]) by mapi (Zmail) with MAPI id mid32; Wed, 2 Apr 2025 19:45:42 +0800 (CST) Date: Wed, 2 Apr 2025 19:45:42 +0800 (CST) X-Zmail-TransId: 2afb67ed2366ffffffffef7-237ea X-Mailer: Zmail v1.0 Message-ID: <20250402194542026OH8jAzuv0uq-J-D9AVPqJ@zte.com.cn> In-Reply-To: <20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn> References: 20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , Cc: , , , , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next_5/5=5D_phy=3A_rockchip=3A_phy-rockchi?= =?utf-8?q?p-typec=3A_Use=C2=A0dev=5Ferr=5Fprobe=28=29?= X-MAIL: mse-fl1.zte.com.cn 532Bjd3j070014 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 67ED2367.000/4ZSNNR0FSrz8QrkZ From: Zhang Enpei Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin --- drivers/phy/rockchip/phy-rockchip-typec.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c index d9701b6106d5..94d1e6ead1a7 100644 --- a/drivers/phy/rockchip/phy-rockchip-typec.c +++ b/drivers/phy/rockchip/phy-rockchip-typec.c @@ -1151,11 +1151,9 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) if (IS_ERR(tcphy->extcon)) { 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); - } + } else + return dev_err_probe(dev, PTR_ERR(tcphy->extcon), + "Invalid or missing extcon\n"); } pm_runtime_enable(dev);