mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01: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:
parent
765fcd7c07
commit
5f3e10797a
1 changed files with 2 additions and 4 deletions
|
|
@ -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))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue