summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2018-05-09 21:46:29 +0200
committerWolfram Sang <wsa@the-dreams.de>2018-05-15 09:30:34 +0200
commitde9a8634f1cb4560a35696d472cc7f1383d9b866 (patch)
treec8eac6d486b85246107d07eeb249d4fe8097949e /drivers/i2c
parenti2c: designware: fix poll-after-enable regression (diff)
downloadlinux-de9a8634f1cb4560a35696d472cc7f1383d9b866.tar.xz
linux-de9a8634f1cb4560a35696d472cc7f1383d9b866.zip
i2c: pmcmsp: return message count on master_xfer success
Returning zero is wrong in this case. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pmcmsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c
index 2aa0e83174c5..ec27e27e8d06 100644
--- a/drivers/i2c/busses/i2c-pmcmsp.c
+++ b/drivers/i2c/busses/i2c-pmcmsp.c
@@ -567,7 +567,7 @@ static int pmcmsptwi_master_xfer(struct i2c_adapter *adap,
return -1;
}
- return 0;
+ return num;
}
static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter)