mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 18:26:42 +00:00
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: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200902172433.1138-2-krzk@kernel.org Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
This commit is contained in:
parent
392da338b2
commit
e0cbf2f0a7
@ -184,10 +184,8 @@ static int imx_icc_register_nodes(struct icc_provider *provider,
|
||||
|
||||
node = imx_icc_node_add(provider, node_desc);
|
||||
if (IS_ERR(node)) {
|
||||
ret = PTR_ERR(node);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(provider->dev, "failed to add %s: %d\n",
|
||||
node_desc->name, ret);
|
||||
ret = dev_err_probe(provider->dev, PTR_ERR(node),
|
||||
"failed to add %s\n", node_desc->name);
|
||||
goto err;
|
||||
}
|
||||
provider_data->nodes[node->id] = node;
|
||||
|
Loading…
x
Reference in New Issue
Block a user