From 3b0c31c138d6bcf87301cf82200f244e0c39f0de Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 11 Apr 2018 18:37:17 -0300 Subject: [PATCH] crypto: rsa - Remove unneeded error assignment There is no need to assign an error value to 'ret' prior to calling mpi_read_raw_from_sgl() because in the case of error the 'ret' variable will be assigned to the error code inside the if block. In the case of non failure, 'ret' will be overwritten immediately after, so remove the unneeded assignment. Signed-off-by: Fabio Estevam Signed-off-by: Herbert Xu --- crypto/rsa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/rsa.c b/crypto/rsa.c index b067f3a938805..4167980c243d4 100644 --- a/crypto/rsa.c +++ b/crypto/rsa.c @@ -215,7 +215,6 @@ static int rsa_verify(struct akcipher_request *req) goto err_free_m; } - ret = -ENOMEM; s = mpi_read_raw_from_sgl(req->src, req->src_len); if (!s) { ret = -ENOMEM; -- 2.39.5