mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
KVM: guest_memfd: Drop a superfluous local var in kvm_gmem_fault_user_mapping()
Drop the local "int err" that's buried in the middle guest_memfd's user fault handler to avoid the potential for variable shadowing, e.g. if an "err" variable were also declared at function scope. No functional change intended. Link: https://lore.kernel.org/r/20251007222733.349460-1-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
@@ -361,12 +361,10 @@ static vm_fault_t kvm_gmem_fault_user_mapping(struct vm_fault *vmf)
|
||||
|
||||
folio = kvm_gmem_get_folio(inode, vmf->pgoff);
|
||||
if (IS_ERR(folio)) {
|
||||
int err = PTR_ERR(folio);
|
||||
|
||||
if (err == -EAGAIN)
|
||||
if (PTR_ERR(folio) == -EAGAIN)
|
||||
return VM_FAULT_RETRY;
|
||||
|
||||
return vmf_error(err);
|
||||
return vmf_error(PTR_ERR(folio));
|
||||
}
|
||||
|
||||
if (WARN_ON_ONCE(folio_test_large(folio))) {
|
||||
|
||||
Reference in New Issue
Block a user