* [PATCH] phy: rockchip-typec: Use dev_err_probe()
@ 2023-03-23 7:50 ye.xingchen
0 siblings, 0 replies; only message in thread
From: ye.xingchen @ 2023-03-23 7:50 UTC (permalink / raw)
To: vkoul
Cc: kishon, heiko, linux-phy, linux-arm-kernel, linux-rockchip, linux-kernel
From: Ye Xingchen <ye.xingchen@zte.com.cn>
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
---
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");
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-23 7:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 7:50 [PATCH] phy: rockchip-typec: Use dev_err_probe() ye.xingchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).