Skip to content

Commit 42c7cb7

Browse files
Chunfeng Yunkishon
authored andcommitted
phy: phy-meson-gxl-usb2: get optional clock by devm_clk_get_optional()
Use devm_clk_get_optional() to get optional clock Cc: Martin Blumenstingl <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Acked-by: Martin Blumenstingl <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]>
1 parent 752d31a commit 42c7cb7

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/phy/amlogic/phy-meson-gxl-usb2.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,9 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev)
261261
if (IS_ERR(priv->regmap))
262262
return PTR_ERR(priv->regmap);
263263

264-
priv->clk = devm_clk_get(dev, "phy");
265-
if (IS_ERR(priv->clk)) {
266-
ret = PTR_ERR(priv->clk);
267-
if (ret == -ENOENT)
268-
priv->clk = NULL;
269-
else
270-
return ret;
271-
}
264+
priv->clk = devm_clk_get_optional(dev, "phy");
265+
if (IS_ERR(priv->clk))
266+
return PTR_ERR(priv->clk);
272267

273268
priv->reset = devm_reset_control_get_optional_shared(dev, "phy");
274269
if (IS_ERR(priv->reset))

0 commit comments

Comments
 (0)