diff options
author | Tony Lindgren <tony@atomide.com> | 2019-04-07 11:12:54 -0700 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2019-04-15 22:54:06 +0200 |
commit | 7d90fcc14a25b1ba715427f2af706809bb56a6f4 (patch) | |
tree | 08752a7dec02d3ce9e7453ebc8c5c18d2f4fe844 /drivers/power/supply | |
parent | ffaf6f6773af7d2bad983f43f6ffb4246591a578 (diff) |
power: supply: cpcap-charger: Fix pointless EPROBE_DEFER warnings
With loadable modules we may get the following during init:
could not initialize VBUS or ID IIO: -517
Let's not print any pointless error messages for deferred probe.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply')
-rw-r--r-- | drivers/power/supply/cpcap-charger.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c index c3ed7b476676..b4781b5d1e10 100644 --- a/drivers/power/supply/cpcap-charger.c +++ b/drivers/power/supply/cpcap-charger.c @@ -574,8 +574,9 @@ static int cpcap_charger_init_iio(struct cpcap_charger_ddata *ddata) return 0; out_err: - dev_err(ddata->dev, "could not initialize VBUS or ID IIO: %i\n", - error); + if (error != -EPROBE_DEFER) + dev_err(ddata->dev, "could not initialize VBUS or ID IIO: %i\n", + error); return error; } |