Skip to content

Commit

Permalink
crypto: rsa - Remove unneeded error assignment
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Fabio Estevam authored and herbertx committed Apr 20, 2018
1 parent 3360738 commit b2b4f84
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion crypto/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2b4f84

Please sign in to comment.