Commit aac87636 authored by Heiko Carstens's avatar Heiko Carstens Committed by Avi Kivity

KVM: get rid of warning within kvm_dev_ioctl_create_vm

Fixes this:

  CC      arch/s390/kvm/../../../virt/kvm/kvm_main.o
arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_dev_ioctl_create_vm':
arch/s390/kvm/../../../virt/kvm/kvm_main.c:1828:10: warning: unused variable 'r'
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 3bcc8a8c
......@@ -1961,7 +1961,7 @@ static struct file_operations kvm_vm_fops = {
static int kvm_dev_ioctl_create_vm(void)
{
int fd, r;
int r;
struct kvm *kvm;
kvm = kvm_create_vm();
......@@ -1974,11 +1974,11 @@ static int kvm_dev_ioctl_create_vm(void)
return r;
}
#endif
fd = anon_inode_getfd("kvm-vm", &kvm_vm_fops, kvm, O_RDWR);
if (fd < 0)
r = anon_inode_getfd("kvm-vm", &kvm_vm_fops, kvm, O_RDWR);
if (r < 0)
kvm_put_kvm(kvm);
return fd;
return r;
}
static long kvm_dev_ioctl_check_extension_generic(long arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment