]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.19/i2c-synquacer-fix-synquacer_i2c_doxfer-return-value.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.19 / i2c-synquacer-fix-synquacer_i2c_doxfer-return-value.patch
CommitLineData
638585f7
GKH
1From ff9378904d9d7a3fcb8406604e089e535e357b1d Mon Sep 17 00:00:00 2001
2From: Masahisa Kojima <masahisa.kojima@linaro.org>
3Date: Tue, 21 May 2019 10:33:50 +0900
4Subject: i2c: synquacer: fix synquacer_i2c_doxfer() return value
5
6From: Masahisa Kojima <masahisa.kojima@linaro.org>
7
8commit ff9378904d9d7a3fcb8406604e089e535e357b1d upstream.
9
10master_xfer should return the number of messages successfully
11processed.
12
13Fixes: 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C controller")
14Cc: <stable@vger.kernel.org> # v4.19+
15Signed-off-by: Okamoto Satoru <okamoto.satoru@socionext.com>
16Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
17Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
18Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21---
22 drivers/i2c/busses/i2c-synquacer.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25--- a/drivers/i2c/busses/i2c-synquacer.c
26+++ b/drivers/i2c/busses/i2c-synquacer.c
27@@ -356,7 +356,7 @@ static int synquacer_i2c_doxfer(struct s
28 /* wait 2 clock periods to ensure the stop has been through the bus */
29 udelay(DIV_ROUND_UP(2 * 1000, i2c->speed_khz));
30
31- return 0;
32+ return ret;
33 }
34
35 static irqreturn_t synquacer_i2c_isr(int irq, void *dev_id)