diff options
author | Ye Xingchen <[email protected]> | 2023-03-23 15:45:52 +0800 |
---|---|---|
committer | Vinod Koul <[email protected]> | 2023-03-31 19:20:19 +0530 |
commit | 623cb3e22c9d7ecb655df8e32701c8a92313746b (patch) | |
tree | 13d98be2404c96828c1cef2094d16c35c30c5061 | |
parent | d414c14c2d162f379f62bc48ef8eb7dfd1c08be5 (diff) |
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 <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
-rw-r--r-- | drivers/phy/ti/phy-omap-usb2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c index bbe5d25b0351..762d3de8b3c5 100644 --- a/drivers/phy/ti/phy-omap-usb2.c +++ b/drivers/phy/ti/phy-omap-usb2.c @@ -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"); |