Skip to content

Commit

Permalink
i2c: mux: reg: don't log an error for probe deferral
Browse files Browse the repository at this point in the history
It's possible that i2c_mux_reg_probe_dt() could return -EPROBE_DEFER.
In that case, driver will request a probe deferral and an error
suggesting device tree parsing problem will be reported. This is
a pretty confusing information. Let's change the error handling,
so driver will be able to request probe deferral without logging
not related errors.

Signed-off-by: Tomasz Bachorski <tomasz.bachorski@nokia.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
  • Loading branch information
Tomasz Bachorski authored and Peter Rosin committed Dec 30, 2017
1 parent 8f6d601 commit ac5b85d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/i2c/muxes/i2c-mux-reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
sizeof(mux->data));
} else {
ret = i2c_mux_reg_probe_dt(mux, pdev);
if (ret == -EPROBE_DEFER)
return ret;

if (ret < 0) {
dev_err(&pdev->dev, "Error parsing device tree");
return ret;
Expand Down

0 comments on commit ac5b85d

Please sign in to comment.