fix i2c slave register failed

Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
This commit is contained in:
Shoukui Zhang 2023-11-08 15:01:09 +08:00 committed by Alan Carvalho de Assis
parent f4a234613e
commit 1ea19e7c54

View File

@ -509,7 +509,7 @@ int i2c_slave_register(FAR struct i2c_slave_s *dev, int bus, int addr,
}
ret = I2CS_REGISTERCALLBACK(priv->dev, i2c_slave_callback, priv);
if (ret > 0)
if (ret >= 0)
{
return OK;
}