Commit aabbf213 authored by Lothar Rubusch's avatar Lothar Rubusch Committed by Herbert Xu

crypto: atmel-sha204a - fix negated return value

Fix negated variable return value.

Fixes: e05ce444 ("crypto: atmel-sha204a - add reading from otp zone")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-crypto/34cd4179-090e-479d-b459-8d0d35dd327d@moroto.mountain/Signed-off-by: default avatarLothar Rubusch <l.rubusch@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 8d7c52cb
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment