Per dm_i2c_ops.probe_chip documentation, i2c_probe_chip() shall fallback
to default probe method when .probe_chip() returns -ENOSYS.

Signed-off-by: Nikita Yushchenko <nikita.yo...@cogentembedded.com>
---
 drivers/i2c/i2c-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index 5539becc19..335911c46b 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -280,7 +280,7 @@ static int i2c_probe_chip(struct udevice *bus, uint 
chip_addr,
 
        if (ops->probe_chip) {
                ret = ops->probe_chip(bus, chip_addr, chip_flags);
-               if (!ret || ret != -ENOSYS)
+               if (ret != -ENOSYS)
                        return ret;
        }
 
-- 
2.30.2

Reply via email to