aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorLothar Rubusch2024-05-26 10:31:28 +0000
committerHerbert Xu2024-05-31 17:34:56 +0800
commitaabbf2135f9a9526991f17cb0c78cf1ec878f1c2 (patch)
treec02aa0a4e80dc60b6225233beab31d15c019a744 /drivers/crypto
parent8d7c52cb4184d3dc26dde62b4f5acd48de0768ae (diff)
crypto: atmel-sha204a - fix negated return value
Fix negated variable return value. Fixes: e05ce444e9e5 ("crypto: atmel-sha204a - add reading from otp zone") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-crypto/34cd4179-090e-479d-b459-8d0d35dd327d@moroto.mountain/ Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/atmel-sha204a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index 24ffdf505023..2034f6031518 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -106,7 +106,7 @@ static int atmel_sha204a_otp_read(struct i2c_client *client, u16 addr, u8 *otp)
if (cmd.data[0] == 0xff) {
dev_err(&client->dev, "failed, device not ready\n");
- return -ret;
+ return -EINVAL;
}
memcpy(otp, cmd.data+1, 4);