Commit 27a40462 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Vinod Koul

phy: ti: gmii-sel: Simplify with dev_err_probe()

Use dev_err_probe() to avoid dmesg flood on actual defer.  This makes
the code also simpler.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240826-phy-of-node-scope-v1-9-5b4d82582644@linaro.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 29b44a38
...@@ -468,11 +468,9 @@ static int phy_gmii_sel_probe(struct platform_device *pdev) ...@@ -468,11 +468,9 @@ static int phy_gmii_sel_probe(struct platform_device *pdev)
priv->regmap = syscon_node_to_regmap(node->parent); priv->regmap = syscon_node_to_regmap(node->parent);
if (IS_ERR(priv->regmap)) { if (IS_ERR(priv->regmap)) {
priv->regmap = device_node_to_regmap(node); priv->regmap = device_node_to_regmap(node);
if (IS_ERR(priv->regmap)) { if (IS_ERR(priv->regmap))
ret = PTR_ERR(priv->regmap); return dev_err_probe(dev, PTR_ERR(priv->regmap),
dev_err(dev, "Failed to get syscon %d\n", ret); "Failed to get syscon\n");
return ret;
}
priv->no_offset = true; priv->no_offset = true;
} }
...@@ -485,11 +483,9 @@ static int phy_gmii_sel_probe(struct platform_device *pdev) ...@@ -485,11 +483,9 @@ static int phy_gmii_sel_probe(struct platform_device *pdev)
priv->phy_provider = priv->phy_provider =
devm_of_phy_provider_register(dev, devm_of_phy_provider_register(dev,
phy_gmii_sel_of_xlate); phy_gmii_sel_of_xlate);
if (IS_ERR(priv->phy_provider)) { if (IS_ERR(priv->phy_provider))
ret = PTR_ERR(priv->phy_provider); return dev_err_probe(dev, PTR_ERR(priv->phy_provider),
dev_err(dev, "Failed to create phy provider %d\n", ret); "Failed to create phy provider\n");
return ret;
}
return 0; return 0;
} }
......
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