]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: guest_memfd: remove redundant gmem variable initialization
authorShivank Garg <shivankg@amd.com>
Sun, 12 Oct 2025 07:16:07 +0000 (07:16 +0000)
committerSean Christopherson <seanjc@google.com>
Mon, 20 Oct 2025 13:30:27 +0000 (06:30 -0700)
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 <david@redhat.com>
Signed-off-by: Shivank Garg <shivankg@amd.com>
Link: https://lore.kernel.org/r/20251012071607.17646-2-shivankg@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
virt/kvm/guest_memfd.c

index 22dacf49a04dd585a6dadfad90fc448c879b016f..caa87efc8f7aeb9833df7a7f2e40a07873515ebd 100644 (file)
@@ -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);