diff options
author | Tom Rini <trini@konsulko.com> | 2023-08-08 21:38:05 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-08 21:38:05 -0400 |
commit | 1e1437d9f8b5be362afdd0212dbae6c41f53f3d8 (patch) | |
tree | 7c22536424032112c0c5e3ddce45f0333478f355 /drivers/misc/cros_ec.c | |
parent | a169438411f9277cc689c14078151aa1d1caae3c (diff) | |
parent | 70fdcc704a978acb4de5e891469825596c0d292e (diff) |
Merge branch '2023-08-08-assorted-code-corrections' into next
- A number of code corrections caught by Smatch and a few others as
well.
Diffstat (limited to 'drivers/misc/cros_ec.c')
-rw-r--r-- | drivers/misc/cros_ec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c index 621d1752176..9c1e6a5e3e7 100644 --- a/drivers/misc/cros_ec.c +++ b/drivers/misc/cros_ec.c @@ -1100,8 +1100,11 @@ int cros_ec_get_sku_id(struct udevice *dev) ret = ec_command_inptr(dev, EC_CMD_GET_SKU_ID, 0, NULL, 0, (uint8_t **)&r, sizeof(*r)); - if (ret != sizeof(*r)) - return -ret; + if (ret != sizeof(*r)) { + if (ret >= 0) + ret = -EIO; + return ret; + } return r->sku_id; } |