diff options
author | Chen Zhou <chenzhou10@huawei.com> | 2020-04-01 15:09:03 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2020-05-27 03:39:31 +0200 |
commit | 32e594f9a63f6bc7fdd396d9bc0a77b18208332b (patch) | |
tree | 22afa89fb88f3b42932d34b70f857c883694c59a /arch/powerpc | |
parent | Merge tag 'noinstr-x86-kvm-2020-05-16' of git://git.kernel.org/pub/scm/linux/... (diff) | |
download | linux-32e594f9a63f6bc7fdd396d9bc0a77b18208332b.tar.xz linux-32e594f9a63f6bc7fdd396d9bc0a77b18208332b.zip |
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: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_nested.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_nested.c b/arch/powerpc/kvm/book3s_hv_nested.c index dc97e5be76f6..cad324312040 100644 --- a/arch/powerpc/kvm/book3s_hv_nested.c +++ b/arch/powerpc/kvm/book3s_hv_nested.c @@ -1416,8 +1416,7 @@ 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); + kfree(n_rmap); if (ret == -EAGAIN) ret = RESUME_GUEST; /* Let the guest try again */ |