KVM: PPC: Book3S HV: Return ENODEV error rather than EIO
authorPaul Mackerras <paulus@samba.org>
Mon, 24 Mar 2014 23:47:05 +0000 (10:47 +1100)
committerPaul Mackerras <paulus@samba.org>
Sat, 29 Mar 2014 08:58:29 +0000 (19:58 +1100)
If an attempt is made to load the kvm-hv module on a machine which
doesn't have hypervisor mode available, return an ENODEV error,
which is the conventional thing to return to indicate that this
module is not applicable to the hardware of the current machine,
rather than EIO, which causes a warning to be printed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/kvm/book3s_hv.c

index a6d8f01..8227dba 100644 (file)
@@ -2467,7 +2467,7 @@ static int kvmppc_book3s_init_hv(void)
         */
        r = kvmppc_core_check_processor_compat_hv();
        if (r < 0)
-               return r;
+               return -ENODEV;
 
        kvm_ops_hv.owner = THIS_MODULE;
        kvmppc_hv_ops = &kvm_ops_hv;