aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kvm/kvm_mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kvm/kvm_mips.c')
-rw-r--r--arch/mips/kvm/kvm_mips.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c
index 330b3af701a6..289b4d2ae45c 100644
--- a/arch/mips/kvm/kvm_mips.c
+++ b/arch/mips/kvm/kvm_mips.c
@@ -97,9 +97,7 @@ void kvm_arch_hardware_unsetup(void)
97 97
98void kvm_arch_check_processor_compat(void *rtn) 98void kvm_arch_check_processor_compat(void *rtn)
99{ 99{
100 int *r = (int *)rtn; 100 *(int *)rtn = 0;
101 *r = 0;
102 return;
103} 101}
104 102
105static void kvm_mips_init_tlbs(struct kvm *kvm) 103static void kvm_mips_init_tlbs(struct kvm *kvm)
@@ -225,7 +223,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
225 enum kvm_mr_change change) 223 enum kvm_mr_change change)
226{ 224{
227 unsigned long npages = 0; 225 unsigned long npages = 0;
228 int i, err = 0; 226 int i;
229 227
230 kvm_debug("%s: kvm: %p slot: %d, GPA: %llx, size: %llx, QVA: %llx\n", 228 kvm_debug("%s: kvm: %p slot: %d, GPA: %llx, size: %llx, QVA: %llx\n",
231 __func__, kvm, mem->slot, mem->guest_phys_addr, 229 __func__, kvm, mem->slot, mem->guest_phys_addr,
@@ -243,8 +241,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
243 241
244 if (!kvm->arch.guest_pmap) { 242 if (!kvm->arch.guest_pmap) {
245 kvm_err("Failed to allocate guest PMAP"); 243 kvm_err("Failed to allocate guest PMAP");
246 err = -ENOMEM; 244 return;
247 goto out;
248 } 245 }
249 246
250 kvm_debug("Allocated space for Guest PMAP Table (%ld pages) @ %p\n", 247 kvm_debug("Allocated space for Guest PMAP Table (%ld pages) @ %p\n",
@@ -255,8 +252,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
255 kvm->arch.guest_pmap[i] = KVM_INVALID_PAGE; 252 kvm->arch.guest_pmap[i] = KVM_INVALID_PAGE;
256 } 253 }
257 } 254 }
258out:
259 return;
260} 255}
261 256
262void kvm_arch_flush_shadow_all(struct kvm *kvm) 257void kvm_arch_flush_shadow_all(struct kvm *kvm)
@@ -845,16 +840,12 @@ long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
845 840
846int kvm_arch_init(void *opaque) 841int kvm_arch_init(void *opaque)
847{ 842{
848 int ret;
849
850 if (kvm_mips_callbacks) { 843 if (kvm_mips_callbacks) {
851 kvm_err("kvm: module already exists\n"); 844 kvm_err("kvm: module already exists\n");
852 return -EEXIST; 845 return -EEXIST;
853 } 846 }
854 847
855 ret = kvm_mips_emulation_init(&kvm_mips_callbacks); 848 return kvm_mips_emulation_init(&kvm_mips_callbacks);
856
857 return ret;
858} 849}
859 850
860void kvm_arch_exit(void) 851void kvm_arch_exit(void)
@@ -1008,7 +999,6 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
1008 999
1009void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) 1000void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
1010{ 1001{
1011 return;
1012} 1002}
1013 1003
1014int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, 1004int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,