Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d4d159f authored by Peter Rosin's avatar Peter Rosin
Browse files

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.

Reviewed-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
parent 743cc375
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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;
	}