Skip to content

Commit

Permalink
KVM: remove redundant assigment of return value in kvm_dev_ioctl
Browse files Browse the repository at this point in the history
The first statement of kvm_dev_ioctl is
        long r = -EINVAL;

No need to reassign the same value.

Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
borntraeger authored and bonzini committed Sep 5, 2014
1 parent 3465611 commit a13f533
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2627,7 +2627,6 @@ static long kvm_dev_ioctl(struct file *filp,

switch (ioctl) {
case KVM_GET_API_VERSION:
r = -EINVAL;
if (arg)
goto out;
r = KVM_API_VERSION;
Expand All @@ -2639,7 +2638,6 @@ static long kvm_dev_ioctl(struct file *filp,
r = kvm_vm_ioctl_check_extension_generic(NULL, arg);
break;
case KVM_GET_VCPU_MMAP_SIZE:
r = -EINVAL;
if (arg)
goto out;
r = PAGE_SIZE; /* struct kvm_run */
Expand Down

0 comments on commit a13f533

Please sign in to comment.