Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/202303231545522162256@zte.com.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Ye Xingchen and committed by
Vinod Koul
623cb3e2 d414c14c

+3 -5
+3 -5
drivers/phy/ti/phy-omap-usb2.c
··· 445 445 PTR_ERR(phy->wkupclk)); 446 446 phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k"); 447 447 448 - if (IS_ERR(phy->wkupclk)) { 449 - if (PTR_ERR(phy->wkupclk) != -EPROBE_DEFER) 450 - dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n"); 451 - return PTR_ERR(phy->wkupclk); 452 - } 448 + if (IS_ERR(phy->wkupclk)) 449 + return dev_err_probe(&pdev->dev, PTR_ERR(phy->wkupclk), 450 + "unable to get usb_phy_cm_clk32k\n"); 453 451 454 452 dev_warn(&pdev->dev, 455 453 "found usb_phy_cm_clk32k, please fix DTS\n");