From: Shivank Garg Date: Sun, 12 Oct 2025 07:16:07 +0000 (+0000) Subject: KVM: guest_memfd: remove redundant gmem variable initialization X-Git-Tag: v6.19-rc1~103^2~10^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f1078a445d9038532a572ff643a826ed9335259;p=thirdparty%2Fkernel%2Flinux.git KVM: guest_memfd: remove redundant gmem variable initialization Remove redundant initialization of gmem in __kvm_gmem_get_pfn() as it is already initialized at the top of the function. No functional change intended. Reviewed-by: David Hildenbrand Signed-off-by: Shivank Garg Link: https://lore.kernel.org/r/20251012071607.17646-2-shivankg@amd.com Signed-off-by: Sean Christopherson --- diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index 22dacf49a04dd..caa87efc8f7ae 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -668,7 +668,6 @@ static struct folio *__kvm_gmem_get_pfn(struct file *file, return ERR_PTR(-EFAULT); } - gmem = file->private_data; if (xa_load(&gmem->bindings, index) != slot) { WARN_ON_ONCE(xa_load(&gmem->bindings, index)); return ERR_PTR(-EIO);