diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c index d2c33ba36..604698afd 100644 --- a/wolfcrypt/src/integer.c +++ b/wolfcrypt/src/integer.c @@ -1197,8 +1197,7 @@ int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c) goto LBL_ERR; } if (mp_isone(&x)) { - mp_set(c, 1); - res = MP_OKAY; + res = mp_set(c, 1); goto LBL_ERR; } if ((res = mp_copy (b, &y)) != MP_OKAY) {