diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-02 19:24:32 +0200 |
---|---|---|
committer | Georgi Djakov <georgi.djakov@linaro.org> | 2020-09-18 09:53:57 +0300 |
commit | 392da338b25e5a7d87929db22e93cb4aaf0251fe (patch) | |
tree | 6df09efd000353aebf45e7be4e90c7905859375d /drivers/interconnect | |
parent | 628fdbcf9d665ab68f5493936ca23383a5844ff7 (diff) |
interconnect: core: 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-1-krzk@kernel.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'drivers/interconnect')
-rw-r--r-- | drivers/interconnect/core.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index 998ede7e87ef..eea47b4c84aa 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -478,18 +478,14 @@ struct icc_path *of_icc_get_by_index(struct device *dev, int idx) src_data = of_icc_get_from_provider(&src_args); if (IS_ERR(src_data)) { - if (PTR_ERR(src_data) != -EPROBE_DEFER) - dev_err(dev, "error finding src node: %ld\n", - PTR_ERR(src_data)); + dev_err_probe(dev, PTR_ERR(src_data), "error finding src node\n"); return ERR_CAST(src_data); } dst_data = of_icc_get_from_provider(&dst_args); if (IS_ERR(dst_data)) { - if (PTR_ERR(dst_data) != -EPROBE_DEFER) - dev_err(dev, "error finding dst node: %ld\n", - PTR_ERR(dst_data)); + dev_err_probe(dev, PTR_ERR(dst_data), "error finding dst node\n"); kfree(src_data); return ERR_CAST(dst_data); } |