Commit cd843399 authored by Qianqiang Liu's avatar Qianqiang Liu Committed by Herbert Xu

crypto: lib/mpi - Fix an "Uninitialized scalar variable" issue

The "err" variable may be returned without an initialized value.

Fixes: 8e3a67f2 ("crypto: lib/mpi - Add error checks to extension")
Signed-off-by: default avatarQianqiang Liu <qianqiang.liu@163.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e845d239
...@@ -21,7 +21,7 @@ int mpi_mul(MPI w, MPI u, MPI v) ...@@ -21,7 +21,7 @@ int mpi_mul(MPI w, MPI u, MPI v)
int usign, vsign, sign_product; int usign, vsign, sign_product;
int assign_wp = 0; int assign_wp = 0;
mpi_ptr_t tmp_limb = NULL; mpi_ptr_t tmp_limb = NULL;
int err; int err = 0;
if (u->nlimbs < v->nlimbs) { if (u->nlimbs < v->nlimbs) {
/* Swap U and V. */ /* Swap U and V. */
......
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