diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-02-21 09:32:19 +0200 | 
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-02-21 09:32:19 +0200 | 
| commit | 3f60db4bde17088feed5f143582d7661cdbb9a01 (patch) | |
| tree | 21a7866ae6d199cfa8f619ced9500687bdf84f18 /lib/mpi/mpiutil.c | |
| parent | 5e36097889725dbe4f098c3f1e93cb2f21cae6ee (diff) | |
| parent | b01543dfe67bb1d191998e90d20534dc354de059 (diff) | |
Merge commit 'v3.3-rc4'
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 eefc55d6b7f..26e4ed31e25 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); | 
