crypto: lib/mpi - Add error checks to extension
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 10 Aug 2024 06:20:57 +0000 (14:20 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 17 Aug 2024 05:55:50 +0000 (13:55 +0800)
commit8e3a67f2de87ee94ac11ea69beb4edc2993b17a0
treef9d05f6e63667776697cf2642098292f7c9d91cf
parentfca5cb4dd2b4a9423cb6d112cc71c33899955a1f
crypto: lib/mpi - Add error checks to extension

The remaining functions added by commit
a8ea8bdd9df92a0e5db5b43900abb7a288b8a53e did not check for memory
allocation errors.  Add the checks and change the API to allow errors
to be returned.

Fixes: a8ea8bdd9df9 ("lib/mpi: Extend the MPI library")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/linux/mpi.h
lib/crypto/mpi/mpi-add.c
lib/crypto/mpi/mpi-bit.c
lib/crypto/mpi/mpi-div.c
lib/crypto/mpi/mpi-internal.h
lib/crypto/mpi/mpi-mod.c
lib/crypto/mpi/mpi-mul.c
lib/crypto/mpi/mpiutil.c