[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1491208718-32068-2-git-send-email-peda@axentia.se>
Date: Mon, 3 Apr 2017 10:38:30 +0200
From: Peter Rosin <peda@...ntia.se>
To: <linux-kernel@...r.kernel.org>
CC: Peter Rosin <peda@...ntia.se>, Wolfram Sang <wsa@...-dreams.de>,
Peter Korsgaard <peter.korsgaard@...co.com>,
Guenter Roeck <linux@...ck-us.net>,
Linus Walleij <linus.walleij@...aro.org>,
Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
<linux-i2c@...r.kernel.org>, <linux-iio@...r.kernel.org>,
<linux-media@...r.kernel.org>
Subject: [PATCH 1/9] i2c: mux: provide more info on failure in i2c_mux_add_adapter
No callers then need to report any further info, thus reducing both the
amount of code and the log noise.
Signed-off-by: Peter Rosin <peda@...ntia.se>
---
drivers/i2c/i2c-mux.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 2178266bca79..26f7237558ba 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -395,13 +395,16 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
if (force_nr) {
priv->adap.nr = force_nr;
ret = i2c_add_numbered_adapter(&priv->adap);
+ dev_err(&parent->dev,
+ "failed to add mux-adapter %u as bus %u (error=%d)\n",
+ chan_id, force_nr, ret);
} else {
ret = i2c_add_adapter(&priv->adap);
+ dev_err(&parent->dev,
+ "failed to add mux-adapter %u (error=%d)\n",
+ chan_id, ret);
}
if (ret < 0) {
- dev_err(&parent->dev,
- "failed to add mux-adapter (error=%d)\n",
- ret);
kfree(priv);
return ret;
}
--
2.1.4
Powered by blists - more mailing lists