public inbox for linux-phy@lists.infradead.org
 help / color / mirror / Atom feed
From: <shao.mingyin@zte.com.cn>
To: <vkoul@kernel.org>, <robert.marko@sartura.hr>
Cc: <kishon@kernel.org>, <wens@csie.org>, <jernej.skrabec@gmail.com>,
	<samuel@sholland.org>, <zhang.enpei@zte.com.cn>,
	<linux-phy@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-sunxi@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<luka.perkov@sartura.hr>, <linux-arm-msm@vger.kernel.org>,
	<heiko@sntech.de>, <linux-rockchip@lists.infradead.org>,
	<yang.yang29@zte.com.cn>, <xu.xin16@zte.com.cn>,
	<ye.xingchen@zte.com.cn>
Subject: [PATCH linux-next 4/5] phy: lantiq: phy-lantiq-rcu-usb2: Use dev_err_probe()
Date: Wed, 2 Apr 2025 19:44:42 +0800 (CST)	[thread overview]
Message-ID: <20250402194442934NKPLNa40VjBaWDWKBGi8l@zte.com.cn> (raw)
In-Reply-To: <20250402194100610qY6KQ4JPISk-4v214Qs36@zte.com.cn>

From: Zhang Enpei <zhang.enpei@zte.com.cn>

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
 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");

-- 
2.25.1

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2025-05-12 11:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 11:41 [PATCH linux-next 0/5] Use dev_err_probe() in phy shao.mingyin
2025-04-02 11:42 ` [PATCH linux-next 1/5] phy: allwinner: phy-sun50i-usb3: Use dev_err_probe() shao.mingyin
2025-04-03 17:39   ` Jernej Škrabec
2025-04-02 11:43 ` [PATCH linux-next 2/5] phy: broadcom: phy-bcm63xx-usbh: " shao.mingyin
2025-04-02 11:43 ` [PATCH linux-next 3/5] phy: qualcomm: phy-qcom-ipq4019-usb: " shao.mingyin
2025-04-02 14:19   ` Dmitry Baryshkov
2025-04-02 11:44 ` shao.mingyin [this message]
2025-04-02 11:45 ` [PATCH linux-next 5/5] phy: rockchip: phy-rockchip-typec: " shao.mingyin
2025-04-05 23:03   ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250402194442934NKPLNa40VjBaWDWKBGi8l@zte.com.cn \
    --to=shao.mingyin@zte.com.cn \
    --cc=heiko@sntech.de \
    --cc=jernej.skrabec@gmail.com \
    --cc=kishon@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=luka.perkov@sartura.hr \
    --cc=robert.marko@sartura.hr \
    --cc=samuel@sholland.org \
    --cc=vkoul@kernel.org \
    --cc=wens@csie.org \
    --cc=xu.xin16@zte.com.cn \
    --cc=yang.yang29@zte.com.cn \
    --cc=ye.xingchen@zte.com.cn \
    --cc=zhang.enpei@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox