From: Shubhrajyoti Datta Date: Wed, 17 Jun 2015 15:18:19 +0000 (+0530) Subject: i2c: xiic: Do not continue in case of errors in Rx X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6b0c8dc3104253a5e4b2ec923eeb48cece0abcb9;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git i2c: xiic: Do not continue in case of errors in Rx In case of error conditions like Arbitration lost or NACK lets signal the waiting process. Handle error cases in the Rx path Signed-off-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 987a18c8b6e3..e23a7b068c60 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -399,6 +399,8 @@ static irqreturn_t xiic_process(int irq, void *dev_id) */ xiic_reinit(i2c); + if (i2c->rx_msg) + xiic_wakeup(i2c, STATE_ERROR); if (i2c->tx_msg) xiic_wakeup(i2c, STATE_ERROR); }