Skip to content

Commit

Permalink
KVM: PPC: Book3S HV: Return ENODEV error rather than EIO
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Scott Wood <[email protected]>
  • Loading branch information
paulusmack committed Mar 29, 2014
1 parent b24f36f commit 739e242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/book3s_hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 739e242

Please sign in to comment.