diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-18 18:22:37 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-18 18:22:37 +0100 |
commit | cb3f2adc03ab055b19c677a6283523861fafebdd (patch) | |
tree | 59cfb6800f0635a4aec16c8e0da619f27e51ee79 /lib/mpi/mpiutil.c | |
parent | 44c76a960a62fcc46cbcaa0a22a34e666a729329 (diff) | |
parent | 828006de1bddf83b6ecf03ec459c15f7c7c22db7 (diff) | |
download | op-kernel-dev-cb3f2adc03ab055b19c677a6283523861fafebdd.zip op-kernel-dev-cb3f2adc03ab055b19c677a6283523861fafebdd.tar.gz |
Merge branch 'topic/asoc' into for-linus
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 eefc55d..26e4ed3 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); |