Commit 623cb3e2 authored by Ye Xingchen's avatar Ye Xingchen Committed by Vinod Koul

phy: omap-usb2-phy: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: default avatarYe Xingchen <ye.xingchen@zte.com.cn>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/202303231545522162256@zte.com.cnSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent d414c14c
......@@ -445,11 +445,9 @@ static int omap_usb2_probe(struct platform_device *pdev)
PTR_ERR(phy->wkupclk));
phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
if (IS_ERR(phy->wkupclk)) {
if (PTR_ERR(phy->wkupclk) != -EPROBE_DEFER)
dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
return PTR_ERR(phy->wkupclk);
}
if (IS_ERR(phy->wkupclk))
return dev_err_probe(&pdev->dev, PTR_ERR(phy->wkupclk),
"unable to get usb_phy_cm_clk32k\n");
dev_warn(&pdev->dev,
"found usb_phy_cm_clk32k, please fix DTS\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment