lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next 2/5] net: ipa: don't report EPROBE_DEFER error
Date
When initializing the IPA core clock and interconnects, it's
possible we'll get an EPROBE_DEFER error. This isn't really an
error, it's just means we need to be re-probed later.

Check the return code when initializing these, and if it's
EPROBE_DEFER, skip printing the error message.

Signed-off-by: Alex Elder <elder@linaro.org>
---
drivers/net/ipa/ipa_clock.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c
index 354675a643db5..9c845f9bb318e 100644
--- a/drivers/net/ipa/ipa_clock.c
+++ b/drivers/net/ipa/ipa_clock.c
@@ -68,8 +68,9 @@ static int ipa_interconnect_init_one(struct device *dev,
if (IS_ERR(path)) {
int ret = PTR_ERR(path);

- dev_err(dev, "error %d getting %s interconnect\n", ret,
- data->name);
+ if (ret != -EPROBE_DEFER)
+ dev_err(dev, "error %d getting %s interconnect\n", ret,
+ data->name);

return ret;
}
@@ -281,7 +282,10 @@ ipa_clock_init(struct device *dev, const struct ipa_clock_data *data)

clk = clk_get(dev, "core");
if (IS_ERR(clk)) {
- dev_err(dev, "error %ld getting core clock\n", PTR_ERR(clk));
+ ret = PTR_ERR(clk);
+ if (ret != -EPROBE_DEFER)
+ dev_err(dev, "error %d getting core clock\n", ret);
+
return ERR_CAST(clk);
}

--
2.20.1
\
 
 \ /
  Last update: 2021-02-10 23:38    [W:0.042 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site