public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: atmel-sha204a - fix negated return value
@ 2024-05-25 19:22 Lothar Rubusch
  2024-05-26  8:53 ` Markus Elfring
  0 siblings, 1 reply; 5+ messages in thread
From: Lothar Rubusch @ 2024-05-25 19:22 UTC (permalink / raw)
  To: herbert, davem
  Cc: dan.carpenter, nicolas.ferre, alexandre.belloni, claudiu.beznea,
	linux-crypto, linux-arm-kernel, linux-kernel, l.rubusch

Fix negated variable return value.

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>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypto: atmel-sha204a - fix negated return value
  2024-05-25 19:22 [PATCH] crypto: atmel-sha204a - fix negated return value Lothar Rubusch
@ 2024-05-26  8:53 ` Markus Elfring
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2024-05-26  8:53 UTC (permalink / raw)
  To: Lothar Rubusch, linux-crypto, linux-arm-kernel, David S. Miller,
	Herbert Xu
  Cc: LKML, Alexandre Belloni, Claudiu Beznea, Dan Carpenter,
	Nicolas Ferre

> Fix negated variable return value.

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

Regards,
Markus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] crypto: atmel-sha204a - fix negated return value
@ 2024-05-26 10:31 Lothar Rubusch
  2024-05-27  8:16 ` Dan Carpenter
  2024-05-31 10:24 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Lothar Rubusch @ 2024-05-26 10:31 UTC (permalink / raw)
  To: herbert, davem
  Cc: dan.carpenter, nicolas.ferre, alexandre.belloni, claudiu.beznea,
	linux-crypto, linux-arm-kernel, linux-kernel, l.rubusch

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>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypto: atmel-sha204a - fix negated return value
  2024-05-26 10:31 Lothar Rubusch
@ 2024-05-27  8:16 ` Dan Carpenter
  2024-05-31 10:24 ` Herbert Xu
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2024-05-27  8:16 UTC (permalink / raw)
  To: Lothar Rubusch
  Cc: herbert, davem, nicolas.ferre, alexandre.belloni, claudiu.beznea,
	linux-crypto, linux-arm-kernel, linux-kernel

On Sun, May 26, 2024 at 10:31:28AM +0000, Lothar Rubusch wrote:
> 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>

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypto: atmel-sha204a - fix negated return value
  2024-05-26 10:31 Lothar Rubusch
  2024-05-27  8:16 ` Dan Carpenter
@ 2024-05-31 10:24 ` Herbert Xu
  1 sibling, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2024-05-31 10:24 UTC (permalink / raw)
  To: Lothar Rubusch
  Cc: davem, dan.carpenter, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-crypto, linux-arm-kernel, linux-kernel

On Sun, May 26, 2024 at 10:31:28AM +0000, Lothar Rubusch wrote:
> 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>
> ---
>  drivers/crypto/atmel-sha204a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-31 10:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-25 19:22 [PATCH] crypto: atmel-sha204a - fix negated return value Lothar Rubusch
2024-05-26  8:53 ` Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2024-05-26 10:31 Lothar Rubusch
2024-05-27  8:16 ` Dan Carpenter
2024-05-31 10:24 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox