From: Qianqiang Liu Date: Fri, 13 Sep 2024 14:07:42 +0000 (+0800) Subject: crypto: lib/mpi - Fix an "Uninitialized scalar variable" issue X-Git-Tag: v6.12-rc5~35^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd843399d706411ff80520fb7883afeeefa76e98;p=thirdparty%2Fkernel%2Flinux.git crypto: lib/mpi - Fix an "Uninitialized scalar variable" issue The "err" variable may be returned without an initialized value. Fixes: 8e3a67f2de87 ("crypto: lib/mpi - Add error checks to extension") Signed-off-by: Qianqiang Liu Signed-off-by: Herbert Xu --- diff --git a/lib/crypto/mpi/mpi-mul.c b/lib/crypto/mpi/mpi-mul.c index 892a246216b9c..7e6ff1ce3e9b6 100644 --- a/lib/crypto/mpi/mpi-mul.c +++ b/lib/crypto/mpi/mpi-mul.c @@ -21,7 +21,7 @@ int mpi_mul(MPI w, MPI u, MPI v) int usign, vsign, sign_product; int assign_wp = 0; mpi_ptr_t tmp_limb = NULL; - int err; + int err = 0; if (u->nlimbs < v->nlimbs) { /* Swap U and V. */