Skip to content

Commit

Permalink
i2c: xiic: return value of xiic_reinit
Browse files Browse the repository at this point in the history
Check the return value of xiic_reinit.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Shubhrajyoti Datta authored and wsakernel committed May 14, 2022
1 parent 96789dc commit 8fa9c93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/i2c/busses/i2c-xiic.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
int xfer_more = 0;
int wakeup_req = 0;
int wakeup_code = 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.
Expand Down Expand Up @@ -415,7 +416,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) {
wakeup_req = 1;
Expand Down

0 comments on commit 8fa9c93

Please sign in to comment.