mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
phy: amlogic: meson8b-usb2: Use dev_err_probe()
[ Upstream commit 6466ba1898
]
Use the existing dev_err_probe() helper instead of open-coding the same
operation.
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
Reported-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220111095255.176141-3-aouledameur@baylibre.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
aa0b729678
commit
8f1d24f85f
1 changed files with 3 additions and 2 deletions
|
@ -261,8 +261,9 @@ static int phy_meson8b_usb2_probe(struct platform_device *pdev)
|
||||||
return PTR_ERR(priv->clk_usb);
|
return PTR_ERR(priv->clk_usb);
|
||||||
|
|
||||||
priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
|
priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
|
||||||
if (PTR_ERR(priv->reset) == -EPROBE_DEFER)
|
if (IS_ERR(priv->reset))
|
||||||
return PTR_ERR(priv->reset);
|
return dev_err_probe(&pdev->dev, PTR_ERR(priv->reset),
|
||||||
|
"Failed to get the reset line");
|
||||||
|
|
||||||
priv->dr_mode = of_usb_get_dr_mode_by_phy(pdev->dev.of_node, -1);
|
priv->dr_mode = of_usb_get_dr_mode_by_phy(pdev->dev.of_node, -1);
|
||||||
if (priv->dr_mode == USB_DR_MODE_UNKNOWN) {
|
if (priv->dr_mode == USB_DR_MODE_UNKNOWN) {
|
||||||
|
|
Loading…
Reference in a new issue