diff mbox series

[1/1] lib: rsa: superfluous initialization in rsa_verify()

Message ID 20201008185313.6833-1-xypron.glpk@gmx.de
State Accepted
Commit ec71cc34c1cef173d9f656d5cc9a2e698fae28fb
Delegated to: Tom Rini
Headers show
Series [1/1] lib: rsa: superfluous initialization in rsa_verify() | expand

Commit Message

Heinrich Schuchardt Oct. 8, 2020, 6:53 p.m. UTC
Remove initialization of ret with unused value.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/rsa/rsa-verify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.28.0

Comments

Simon Glass Oct. 12, 2020, 3:34 a.m. UTC | #1
On Thu, 8 Oct 2020 at 12:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Remove initialization of ret with unused value.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  lib/rsa/rsa-verify.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Oct. 13, 2020, 2:07 p.m. UTC | #2
On Thu, Oct 08, 2020 at 08:53:13PM +0200, Heinrich Schuchardt wrote:

> Remove initialization of ret with unused value.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 2057f6819d..be55a4376f 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -540,7 +540,7 @@  int rsa_verify(struct image_sign_info *info,
 {
 	/* Reserve memory for maximum checksum-length */
 	uint8_t hash[info->crypto->key_len];
-	int ret = -EACCES;
+	int ret;

 	/*
 	 * Verify that the checksum-length does not exceed the