]> git.dujemihanovic.xyz Git - u-boot.git/commit
drivers: mediatek: Fix error handling in mtk_i2c_do_transfer
authorFrancois Berder <fberder@outlook.fr>
Fri, 8 Sep 2023 16:47:46 +0000 (18:47 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 22 Sep 2023 19:54:39 +0000 (15:54 -0400)
commit8cf61051ae6e13e253de0d18501c196bc70522fc
tree964377de3602f6ccb5a2c7aa045d7230edfab3ea
parentc5b42e3e9e757ab44da3006e713d8d02b65aa9fe
drivers: mediatek: Fix error handling in mtk_i2c_do_transfer

Errors were handled only if an I2C transfer timed out
and received a NACK which is very unlikely. This commit
changes the condition such that errors are handled if
an I2C transfer times out or received a NACK.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/i2c/mtk_i2c.c