diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2016-08-22 16:52:21 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-08-25 18:41:34 +0200 |
commit | 9a5382e8ffe86412f442f6a34fde43f94aae530b (patch) | |
tree | 54b138595fd10d1b23db33fc65afcb200a1bfdc0 | |
parent | fa8410b355251fd30341662a40ac6b22d3e38468 (diff) | |
download | linux-stable-9a5382e8ffe86412f442f6a34fde43f94aae530b.tar.gz linux-stable-9a5382e8ffe86412f442f6a34fde43f94aae530b.tar.bz2 linux-stable-9a5382e8ffe86412f442f6a34fde43f94aae530b.zip |
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 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; } |