diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-02-07 13:00:06 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-02-07 13:00:41 +0400 |
commit | 52fce956a7568504a1da90c14b9bf2deaad401bd (patch) | |
tree | 5f9ed93cbdfa8f8356fc0daea8fa2da07eeae7bd /lib/mpi/mpiutil.c | |
parent | 290436c9c61ac983b1bd425da67242a4357c7701 (diff) | |
parent | 9dac6a29e0ce0cd9dec497baa123e216b00b525d (diff) | |
download | linux-52fce956a7568504a1da90c14b9bf2deaad401bd.tar.xz |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
perf/core fixes and improvements.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/mpi/mpiutil.c')
-rw-r--r-- | lib/mpi/mpiutil.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mpi/mpiutil.c b/lib/mpi/mpiutil.c index eefc55d6b7f5..26e4ed31e256 100644 --- a/lib/mpi/mpiutil.c +++ b/lib/mpi/mpiutil.c @@ -58,6 +58,9 @@ mpi_ptr_t mpi_alloc_limb_space(unsigned nlimbs) { size_t len = nlimbs * sizeof(mpi_limb_t); + if (!len) + return NULL; + return kmalloc(len, GFP_KERNEL); } @@ -135,7 +138,7 @@ int mpi_copy(MPI *copied, const MPI a) size_t i; MPI b; - *copied = MPI_NULL; + *copied = NULL; if (a) { b = mpi_alloc(a->nlimbs); |