Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

From: Paul Mackerras <paulus@ozlabs.org>

A check for a NULL return from kzalloc in recently-added code.
This commit is contained in:
Radim Krčmář 2017-04-06 14:41:39 +02:00
commit 8786fa667a
1 changed files with 4 additions and 0 deletions

View File

@ -1487,6 +1487,10 @@ long kvm_vm_ioctl_resize_hpt_prepare(struct kvm *kvm,
/* start new resize */
resize = kzalloc(sizeof(*resize), GFP_KERNEL);
if (!resize) {
ret = -ENOMEM;
goto out;
}
resize->order = shift;
resize->kvm = kvm;
INIT_WORK(&resize->work, resize_hpt_prepare_work);