aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kvm/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kvm/mmu.c')
-rw-r--r--arch/mips/kvm/mmu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
index aab604e75d3b..6379ac1bc7b9 100644
--- a/arch/mips/kvm/mmu.c
+++ b/arch/mips/kvm/mmu.c
@@ -503,16 +503,15 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
503 local_irq_restore(flags); 503 local_irq_restore(flags);
504} 504}
505 505
506u32 kvm_get_inst(u32 *opc, struct kvm_vcpu *vcpu) 506int kvm_get_inst(u32 *opc, struct kvm_vcpu *vcpu, u32 *out)
507{ 507{
508 u32 inst;
509 int err; 508 int err;
510 509
511 err = get_user(inst, opc); 510 err = get_user(*out, opc);
512 if (unlikely(err)) { 511 if (unlikely(err)) {
513 kvm_err("%s: illegal address: %p\n", __func__, opc); 512 kvm_err("%s: illegal address: %p\n", __func__, opc);
514 return KVM_INVALID_INST; 513 return -EFAULT;
515 } 514 }
516 515
517 return inst; 516 return 0;
518} 517}