diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-02 19:24:33 +0200 |
---|---|---|
committer | Georgi Djakov <georgi.djakov@linaro.org> | 2020-09-18 09:55:12 +0300 |
commit | e0cbf2f0a756f27d7b468947123d6ac9d3fc059f (patch) | |
tree | 322329b33d7ca3c3f57d3bea2961be22d3f82cac | |
parent | 392da338b25e5a7d87929db22e93cb4aaf0251fe (diff) | |
download | linux-e0cbf2f0a756f27d7b468947123d6ac9d3fc059f.tar.gz linux-e0cbf2f0a756f27d7b468947123d6ac9d3fc059f.tar.bz2 linux-e0cbf2f0a756f27d7b468947123d6ac9d3fc059f.zip |
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>
-rw-r--r-- | drivers/interconnect/imx/imx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index ac420f86008e..b364d339f797 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -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; |