Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8786fa66 authored by Radim Krčmář's avatar Radim Krčmář
Browse files
From: Paul Mackerras <paulus@ozlabs.org>

A check for a NULL return from kzalloc in recently-added code.
parents 6fd64103 abd80dcb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);