Commit 32e594f9 authored by Chen Zhou's avatar Chen Zhou Committed by Paul Mackerras
Browse files

KVM: PPC: Book3S HV: Remove redundant NULL check



Free function kfree() already does NULL check, so the additional
check is unnecessary, just remove it.

Signed-off-by: default avatarChen Zhou <chenzhou10@huawei.com>
Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
parent 9d5272f5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1416,7 +1416,6 @@ static long int __kvmhv_nested_page_fault(struct kvm_run *run,
	rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn];
	ret = kvmppc_create_pte(kvm, gp->shadow_pgtable, pte, n_gpa, level,
				mmu_seq, gp->shadow_lpid, rmapp, &n_rmap);
	if (n_rmap)
	kfree(n_rmap);
	if (ret == -EAGAIN)
		ret = RESUME_GUEST;	/* Let the guest try again */