phy: rockchip-typec: Use dev_err_probe()
Subsystems (2)
PATCH 1/1 phy: rockchip-typec: Use dev_err_probe()
From: Ye Xingchen <[email protected]>
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by Ye Xingchen <[email protected]>
--- drivers/phy/rockchip/phy-rockchip-typec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/phy/rockchip/phy-rockchip-typec.c +2 -3
@@ -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" ); } }
Signature · 6 lines
2.25.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy