diff options
| author | Thomas Gleixner <[email protected]> | 2018-06-22 19:20:35 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2018-06-22 19:20:35 +0000 |
| commit | 7731b8bc94e599c9a79e428f3359ff2c34b7576a (patch) | |
| tree | 879f18ccbe274122f2d4f095b43cbc7f953e0ada /lib/mpi/mpiutil.c | |
| parent | MAINTAINERS: Add file patterns for x86 device tree bindings (diff) | |
| parent | Merge tag '4.18-rc1-more-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 (diff) | |
| download | kernel-7731b8bc94e599c9a79e428f3359ff2c34b7576a.tar.gz kernel-7731b8bc94e599c9a79e428f3359ff2c34b7576a.zip | |
Merge branch 'linus' into x86/urgent
Required to queue a dependent fix.
Diffstat (limited to 'lib/mpi/mpiutil.c')
| -rw-r--r-- | lib/mpi/mpiutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mpi/mpiutil.c b/lib/mpi/mpiutil.c index 314f4dfa603e..20ed0f766787 100644 --- a/lib/mpi/mpiutil.c +++ b/lib/mpi/mpiutil.c @@ -91,14 +91,14 @@ int mpi_resize(MPI a, unsigned nlimbs) return 0; /* no need to do it */ if (a->d) { - p = kmalloc(nlimbs * sizeof(mpi_limb_t), GFP_KERNEL); + p = kmalloc_array(nlimbs, sizeof(mpi_limb_t), GFP_KERNEL); if (!p) return -ENOMEM; memcpy(p, a->d, a->alloced * sizeof(mpi_limb_t)); kzfree(a->d); a->d = p; } else { - a->d = kzalloc(nlimbs * sizeof(mpi_limb_t), GFP_KERNEL); + a->d = kcalloc(nlimbs, sizeof(mpi_limb_t), GFP_KERNEL); if (!a->d) return -ENOMEM; } |
