]> git.baikalelectronics.ru Git - uboot.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)
commit2082aa5d540b557df94a5dd881224b7ee479cd93
tree964377de3602f6ccb5a2c7aa045d7230edfab3ea
parent300b272105dca0d0ec860b3d36ce7d44acbbf79a
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