Message ID | 20180409141303.14537-1-jbrunet@baylibre.com |
---|---|
State | Accepted |
Commit | 329470f2d5447f76088250d7b7fbc1f9b175ccfc |
Headers | show |
Series | clk: bulk: silently error out on EPROBE_DEFER | expand |
Hi Jerome, On 2018/4/9 22:13, Jerome Brunet wrote: > In clk_bulk_get(), if we fail to get the clock due to probe deferal, we > shouldn't print an error message. Just be silent in this case. > I saw a confusing clk get failure log occasionally, but didn't pay much attention to it as the driver finally probed fine. But probably it came from clk_bulk_get, Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> > --- > drivers/clk/clk-bulk.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/clk-bulk.c b/drivers/clk/clk-bulk.c > index 4c10456f8a32..6904ed6da504 100644 > --- a/drivers/clk/clk-bulk.c > +++ b/drivers/clk/clk-bulk.c > @@ -42,8 +42,9 @@ int __must_check clk_bulk_get(struct device *dev, int num_clks, > clks[i].clk = clk_get(dev, clks[i].id); > if (IS_ERR(clks[i].clk)) { > ret = PTR_ERR(clks[i].clk); > - dev_err(dev, "Failed to get clk '%s': %d\n", > - clks[i].id, ret); > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "Failed to get clk '%s': %d\n", > + clks[i].id, ret); > clks[i].clk = NULL; > goto err; > } >
Quoting Jerome Brunet (2018-04-09 07:13:03) > In clk_bulk_get(), if we fail to get the clock due to probe deferal, we > shouldn't print an error message. Just be silent in this case. > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> > --- Applied to clk-next
diff --git a/drivers/clk/clk-bulk.c b/drivers/clk/clk-bulk.c index 4c10456f8a32..6904ed6da504 100644 --- a/drivers/clk/clk-bulk.c +++ b/drivers/clk/clk-bulk.c @@ -42,8 +42,9 @@ int __must_check clk_bulk_get(struct device *dev, int num_clks, clks[i].clk = clk_get(dev, clks[i].id); if (IS_ERR(clks[i].clk)) { ret = PTR_ERR(clks[i].clk); - dev_err(dev, "Failed to get clk '%s': %d\n", - clks[i].id, ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get clk '%s': %d\n", + clks[i].id, ret); clks[i].clk = NULL; goto err; }
In clk_bulk_get(), if we fail to get the clock due to probe deferal, we shouldn't print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- drivers/clk/clk-bulk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.14.3