summaryrefslogtreecommitdiff
path: root/drivers/i2c/muxes/i2c-mux-pca954x.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-10-12 01:30:33 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-10-12 01:30:33 -0300
commite914f8eb445e8f74b00303c19c2ffceaedd16a05 (patch)
tree86b60bdecb3cf6abe8546f30803b673892a40335 /drivers/i2c/muxes/i2c-mux-pca954x.c
parent1c29f4306f557ef5d9ed515ec8881f4d1735b058 (diff)
Linux-libre 4.7.6-gnupck-4.7.6-gnu
Diffstat (limited to 'drivers/i2c/muxes/i2c-mux-pca954x.c')
-rw-r--r--drivers/i2c/muxes/i2c-mux-pca954x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 528e755c4..3278ebf1c 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -164,7 +164,7 @@ static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan)
/* Only select the channel if its different from the last channel */
if (data->last_chan != regval) {
ret = pca954x_reg_write(muxc->parent, client, regval);
- data->last_chan = regval;
+ data->last_chan = ret ? 0 : regval;
}
return ret;