Commit e0cbf2f0 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Georgi Djakov

interconnect: imx: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200902172433.1138-2-krzk@kernel.orgSigned-off-by: default avatarGeorgi Djakov <georgi.djakov@linaro.org>
parent 392da338
...@@ -184,10 +184,8 @@ static int imx_icc_register_nodes(struct icc_provider *provider, ...@@ -184,10 +184,8 @@ static int imx_icc_register_nodes(struct icc_provider *provider,
node = imx_icc_node_add(provider, node_desc); node = imx_icc_node_add(provider, node_desc);
if (IS_ERR(node)) { if (IS_ERR(node)) {
ret = PTR_ERR(node); ret = dev_err_probe(provider->dev, PTR_ERR(node),
if (ret != -EPROBE_DEFER) "failed to add %s\n", node_desc->name);
dev_err(provider->dev, "failed to add %s: %d\n",
node_desc->name, ret);
goto err; goto err;
} }
provider_data->nodes[node->id] = node; provider_data->nodes[node->id] = node;
......
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