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

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
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment