diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-02-15 21:51:53 +0100 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-02-28 12:54:14 +0900 |
| commit | 094c276da6a0d4971c3faae09a36b51d096659b2 (patch) | |
| tree | c707aa3ffb4b75c0bfc00bfa4bdc7773fc9e6780 /tools/perf/scripts/python | |
| parent | b7abbc8c7acaeb60c114b038f1fa91bbedb3d16a (diff) | |
crypto: atmel-sha204a - Fix error codes in OTP reads
Return -EINVAL from atmel_i2c_init_read_otp_cmd() on invalid addresses
instead of -1. Since the OTP zone is accessed in 4-byte blocks, valid
addresses range from 0 to OTP_ZONE_SIZE / 4 - 1. Fix the bounds check
accordingly.
In atmel_sha204a_otp_read(), propagate the actual error code from
atmel_i2c_init_read_otp_cmd() instead of -1. Also, return -EIO instead
of -EINVAL when the device is not ready.
Cc: stable@vger.kernel.org
Fixes: e05ce444e9e5 ("crypto: atmel-sha204a - add reading from otp zone")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Lothar Rubusch <l.rubusch@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
