]>
Commit | Line | Data |
---|---|---|
638585f7 GKH |
1 | From ff9378904d9d7a3fcb8406604e089e535e357b1d Mon Sep 17 00:00:00 2001 |
2 | From: Masahisa Kojima <masahisa.kojima@linaro.org> | |
3 | Date: Tue, 21 May 2019 10:33:50 +0900 | |
4 | Subject: i2c: synquacer: fix synquacer_i2c_doxfer() return value | |
5 | ||
6 | From: Masahisa Kojima <masahisa.kojima@linaro.org> | |
7 | ||
8 | commit ff9378904d9d7a3fcb8406604e089e535e357b1d upstream. | |
9 | ||
10 | master_xfer should return the number of messages successfully | |
11 | processed. | |
12 | ||
13 | Fixes: 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C controller") | |
14 | Cc: <stable@vger.kernel.org> # v4.19+ | |
15 | Signed-off-by: Okamoto Satoru <okamoto.satoru@socionext.com> | |
16 | Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> | |
17 | Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> | |
18 | Signed-off-by: Wolfram Sang <wsa@the-dreams.de> | |
19 | Signed-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) |