diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-02-08 17:20:01 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2017-02-09 12:06:28 +0100 |
commit | 5982f0849e08fe4e4e7df5e345c4539ce9780b1b (patch) | |
tree | 43ec2378d0de8d1312117cb818b21fcd9c669c41 /arch/powerpc/kvm | |
parent | Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next (diff) | |
download | linux-5982f0849e08fe4e4e7df5e345c4539ce9780b1b.tar.xz linux-5982f0849e08fe4e4e7df5e345c4539ce9780b1b.zip |
KVM: PPC: Book 3S: Fix error return in kvm_vm_ioctl_create_spapr_tce()
Fix to return error code -ENOMEM from the memory alloc error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_64_vio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c index c379ff5a4438..491c5d8120f7 100644 --- a/arch/powerpc/kvm/book3s_64_vio.c +++ b/arch/powerpc/kvm/book3s_64_vio.c @@ -171,6 +171,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm, goto fail; } + ret = -ENOMEM; stt = kzalloc(sizeof(*stt) + npages * sizeof(struct page *), GFP_KERNEL); if (!stt) |