Skip to contentSkip to conversation

i2c: mux: demux-pinctrl: invalidate properly when switching fails

PATCH Applied Wolfram Sang 2 participants 2 messages Aug 22, 2016 – Aug 25, 2016

Subsystems (3)
lore
Share & tools
lore

Wolfram Sang

author maintainer
#0 lore raw

PATCH 1/1 i2c: mux: demux-pinctrl: invalidate properly when switching fails

Make sure the index to the active channel is invalidated when switching fails.

---
 drivers/i2c/muxes/i2c-demux-pinctrl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/muxes/i2c-demux-pinctrl.c +1 -0
index 215ac87f606d2d..b6b9d2582fac56 100644
@@ -107,6 +107,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne
 	of_changeset_revert(&priv->chan[new_chan].chgset);
  err:
 	dev_err(priv->dev, "failed to setup demux-adapter %d (%d)\n", new_chan, ret);
+	priv->cur_chan = -EINVAL;
 	return ret;
 }
 
Signature · 1 line
2.9.3