summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorJing Xiangfeng <jingxiangfeng@huawei.com>2020-09-19 09:12:30 +0200
committerPaul Mackerras <paulus@ozlabs.org>2020-09-22 03:53:55 +0200
commiteb173559c97c3b5d8905cd8a93a5d3f3fb24916d (patch)
treeba03dca8f968203ffd4d733aa6e915449828601d /arch/powerpc/kvm
parentKVM: PPC: Book3S HV: XIVE: Convert to DEFINE_SHOW_ATTRIBUTE (diff)
downloadlinux-eb173559c97c3b5d8905cd8a93a5d3f3fb24916d.tar.xz
linux-eb173559c97c3b5d8905cd8a93a5d3f3fb24916d.zip
KVM: PPC: Book3S: Remove redundant initialization of variable ret
The variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/book3s_64_vio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index 1a529df0ab44..b277a75cd1be 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -283,7 +283,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
struct kvmppc_spapr_tce_table *siter;
struct mm_struct *mm = kvm->mm;
unsigned long npages, size = args->size;
- int ret = -ENOMEM;
+ int ret;
if (!args->size || args->page_shift < 12 || args->page_shift > 34 ||
(args->offset + args->size > (ULLONG_MAX >> args->page_shift)))