[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250402194357404aoSxd3G74tojxA7uCZXiy@zte.com.cn>
Date: Wed, 2 Apr 2025 19:43:57 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <vkoul@...nel.org>, <robert.marko@...tura.hr>
Cc: <kishon@...nel.org>, <wens@...e.org>, <jernej.skrabec@...il.com>,
<samuel@...lland.org>, <zhang.enpei@....com.cn>,
<linux-phy@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-sunxi@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <luka.perkov@...tura.hr>,
<linux-arm-msm@...r.kernel.org>, <heiko@...ech.de>,
<linux-rockchip@...ts.infradead.org>, <yang.yang29@....com.cn>,
<xu.xin16@....com.cn>, <ye.xingchen@....com.cn>
Subject: [PATCH linux-next 3/5] phy: qualcomm: phy-qcom-ipq4019-usb: Use dev_err_probe()
From: Zhang Enpei <zhang.enpei@....com.cn>
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: Zhang Enpei <zhang.enpei@....com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@....com.cn>
---
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))
--
2.25.1
Powered by blists - more mailing lists