diff options
author | Nikita Yushchenko | 2022-02-15 20:58:52 +0300 |
---|---|---|
committer | Heiko Schocher | 2022-03-23 07:27:37 +0100 |
commit | 6db539f983400279cd682fecbbd1fdd4c96d9034 (patch) | |
tree | 3b14573232c05b08839231408b74afdcbc272b9b /drivers/i2c | |
parent | 532a5b297cb27a23979cf2ea2dd2a00bb2e8cf58 (diff) |
i2c: fix always-true condition in i2c_probe_chip()
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.yoush@cogentembedded.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-uclass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index 5539becc197..335911c46bb 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; } |