diff options
| author | Wojciech Szamocki <[email protected]> | 2025-05-23 12:57:07 +0200 |
|---|---|---|
| committer | Heiko Schocher <[email protected]> | 2025-06-02 11:02:58 +0200 |
| commit | ec7b49c4108afdca3864da45b5444efb327ce75c (patch) | |
| tree | dc50cb65f0b175da1fda90735ab0cdaee10de5b0 /scripts | |
| parent | b22a276f039f818d5564bec6637071cfc8a7e432 (diff) | |
i2c: designware_i2c Return -ETIMEDOUT for timeout errors
Change the return value for timeout errors in i2c-designware from 1 to
-ETIMEDOUT. Returning errors as negative values is standard practice in the
u-boot, which enhances error handling consistency across the codebase.
The current behavior can lead to silent errors when functions check for
negative return values to identify errors. For example, in
`dm_i2c_reg_read` from i2c-uclass.c, a timeout results in an uninitialized
value being returned, potentially causing unexpected behavior.
Cc: Heiko Schocher <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Wojciech Szamocki <[email protected]>
Signed-off-by: Wojciech Szamocki <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
