diff options
author | Tzung-Bi Shih <[email protected]> | 2023-01-09 16:15:54 +0800 |
---|---|---|
committer | Tzung-Bi Shih <[email protected]> | 2023-01-18 10:57:51 +0800 |
commit | 8bb233b27fb7c11deefbe2318e75490b22cf3d1a (patch) | |
tree | ef53cb478710d97637f4f22396f9bfd7800e89e4 /drivers/platform/chrome/cros_ec_proto_test.c | |
parent | 961a325becd9a142ae5c8b258e5c2f221f8bfac8 (diff) |
platform/chrome: cros_ec_uart: fix negative type promoted to high
serdev_device_write_buf() returns negative numbers on errors. When
the return value compares to unsigned integer `len`, it promotes to
quite large positive number.
Fix it.
Fixes: 04a8bdd135cc ("platform/chrome: cros_ec_uart: Add transport layer")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Tzung-Bi Shih <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Reviewed-by: Benson Leung <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/platform/chrome/cros_ec_proto_test.c')
0 files changed, 0 insertions, 0 deletions