2024-05-25 19:22:48

by Lothar Rubusch

[permalink] [raw]
Subject: [PATCH] crypto: atmel-sha204a - fix negated return value

Fix negated variable return value.

Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/linux-crypto/[email protected]/
Signed-off-by: Lothar Rubusch <[email protected]>
---
drivers/crypto/atmel-sha204a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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);
--
2.39.2



2024-05-26 08:53:51

by Markus Elfring

[permalink] [raw]
Subject: Re: [PATCH] crypto: atmel-sha204a - fix negated return value

> Fix negated variable return value.

Will it be helpful to add the tag “Fixes”?

Regards,
Markus