diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2016-08-22 10:52:21 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-08-25 12:41:34 -0400 |
commit | 9a5382e8ffe86412f442f6a34fde43f94aae530b (patch) | |
tree | 54b138595fd10d1b23db33fc65afcb200a1bfdc0 | |
parent | fa8410b355251fd30341662a40ac6b22d3e38468 (diff) |
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: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r-- | drivers/i2c/muxes/i2c-demux-pinctrl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c index 215ac87f606d..b6b9d2582fac 100644 --- a/drivers/i2c/muxes/i2c-demux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c | |||
@@ -107,6 +107,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne | |||
107 | of_changeset_revert(&priv->chan[new_chan].chgset); | 107 | of_changeset_revert(&priv->chan[new_chan].chgset); |
108 | err: | 108 | err: |
109 | dev_err(priv->dev, "failed to setup demux-adapter %d (%d)\n", new_chan, ret); | 109 | dev_err(priv->dev, "failed to setup demux-adapter %d (%d)\n", new_chan, ret); |
110 | priv->cur_chan = -EINVAL; | ||
110 | return ret; | 111 | return ret; |
111 | } | 112 | } |
112 | 113 | ||