Re: [PATCH] i2c: xiic: Correct return value check for xiic_reinit()

Andi Shyti
2023-09-21T22:05:40Z

Hi Daniel,

[...]

> @@ -710,7 +710,7 @@ static irqreturn_t xiic_process(int irq, void *dev_id)
> * reset the IP instead of just flush fifos
> */
> ret = xiic_reinit(i2c);
> - if (!ret)
> + if (ret < 0)
> dev_dbg(i2c->adap.dev.parent, "reinit failed\n");

this should be a dev_warn(), but it's anyway out of the scope of
this patch.

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>

Andi