[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210626102806.15402-8-raviteja.narayanam@xilinx.com>
Date: Sat, 26 Jun 2021 15:58:03 +0530
From: Raviteja Narayanam <raviteja.narayanam@...inx.com>
To: <linux-i2c@...r.kernel.org>, <michal.simek@...inx.com>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <git@...inx.com>, <marex@...x.de>,
<joe@...ches.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>,
Raviteja Narayanam <raviteja.narayanam@...inx.com>
Subject: [PATCH v2 07/10] i2c: xiic: Return value of xiic_reinit
From: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
Check the return value of xiic_reinit.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
Signed-off-by: Raviteja Narayanam <raviteja.narayanam@...inx.com>
---
drivers/i2c/busses/i2c-xiic.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 007a78215a90..0d76261f1841 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -504,6 +504,7 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
struct xiic_i2c *i2c = dev_id;
u32 pend, isr, ier;
u32 clr = 0;
+ int ret;
/* Get the interrupt Status from the IPIF. There is no clearing of
* interrupts in the IPIF. Interrupts must be cleared at the source.
@@ -540,7 +541,9 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
* fifos and the next message is a TX with len 0 (only addr)
* reset the IP instead of just flush fifos
*/
- xiic_reinit(i2c);
+ ret = xiic_reinit(i2c);
+ if (!ret)
+ dev_dbg(i2c->adap.dev.parent, "reinit failed\n");
if (i2c->rx_msg)
xiic_wakeup(i2c, STATE_ERROR);
--
2.25.1
Powered by blists - more mailing lists