KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 29 Jan 2014 13:16:39 +0000 (16:16 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Jan 2014 10:56:09 +0000 (11:56 +0100)
commitaac5c4226e7136c331ed384c25d5560204da10a0
treee24e17f6bf825f070c8d8708ac89c26c2c41092f
parentb73117c49364551ff789db7c424a115ac5b77850
KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio()

If kvm_io_bus_register_dev() fails then it returns success but it should
return an error code.

I also did a little cleanup like removing an impossible NULL test.

Cc: stable@vger.kernel.org
Fixes: 2b3c246a682c ('KVM: Make coalesced mmio use a device per zone')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/coalesced_mmio.c