mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 15:14:18 +08:00
KVM: remove redundant assigment of return value in kvm_dev_ioctl
The first statement of kvm_dev_ioctl is long r = -EINVAL; No need to reassign the same value. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
3465611318
commit
a13f533b2f
@ -2627,7 +2627,6 @@ static long kvm_dev_ioctl(struct file *filp,
|
|||||||
|
|
||||||
switch (ioctl) {
|
switch (ioctl) {
|
||||||
case KVM_GET_API_VERSION:
|
case KVM_GET_API_VERSION:
|
||||||
r = -EINVAL;
|
|
||||||
if (arg)
|
if (arg)
|
||||||
goto out;
|
goto out;
|
||||||
r = KVM_API_VERSION;
|
r = KVM_API_VERSION;
|
||||||
@ -2639,7 +2638,6 @@ static long kvm_dev_ioctl(struct file *filp,
|
|||||||
r = kvm_vm_ioctl_check_extension_generic(NULL, arg);
|
r = kvm_vm_ioctl_check_extension_generic(NULL, arg);
|
||||||
break;
|
break;
|
||||||
case KVM_GET_VCPU_MMAP_SIZE:
|
case KVM_GET_VCPU_MMAP_SIZE:
|
||||||
r = -EINVAL;
|
|
||||||
if (arg)
|
if (arg)
|
||||||
goto out;
|
goto out;
|
||||||
r = PAGE_SIZE; /* struct kvm_run */
|
r = PAGE_SIZE; /* struct kvm_run */
|
||||||
|
Loading…
Reference in New Issue
Block a user