Commit 9a5382e8 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

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

Make sure the index to the active channel is invalidated when switching
fails.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent fa8410b3
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment