Commit d7228694 authored by Herbert Xu's avatar Herbert Xu

lib/mpi: Remove unused scalar_copied

The scalar_copied variable is not as the scalar is never copied
in that block.  This patch removes it.

Fixes: d58bb7e5 ("lib/mpi: Introduce ec implementation to...")
Reported-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent daf88f37
...@@ -1252,7 +1252,6 @@ void mpi_ec_mul_point(MPI_POINT result, ...@@ -1252,7 +1252,6 @@ void mpi_ec_mul_point(MPI_POINT result,
MPI_POINT q1, q2, prd, sum; MPI_POINT q1, q2, prd, sum;
unsigned long sw; unsigned long sw;
mpi_size_t rsize; mpi_size_t rsize;
int scalar_copied = 0;
/* Compute scalar point multiplication with Montgomery Ladder. /* Compute scalar point multiplication with Montgomery Ladder.
* Note that we don't use Y-coordinate in the points at all. * Note that we don't use Y-coordinate in the points at all.
...@@ -1314,8 +1313,6 @@ void mpi_ec_mul_point(MPI_POINT result, ...@@ -1314,8 +1313,6 @@ void mpi_ec_mul_point(MPI_POINT result,
point_free(&p2); point_free(&p2);
point_free(&p1_); point_free(&p1_);
point_free(&p2_); point_free(&p2_);
if (scalar_copied)
mpi_free(scalar);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment