Skip to content

Commit

Permalink
KVM: use a more sensible error number when debugfs directory creation…
Browse files Browse the repository at this point in the history
… fails

I don't know if this was due to cut and paste, or somebody was really
using a D20 to pick the error code for kvm_init_debugfs as suggested by
Linus (EFAULT is 14, so the possibility cannot be entirely ruled out).

In any case, this patch fixes it.

Reported-by: Tim Gardner <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed Oct 30, 2013
1 parent d780a31 commit 0c8eb04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3091,7 +3091,7 @@ static const struct file_operations *stat_fops[] = {

static int kvm_init_debug(void)
{
int r = -EFAULT;
int r = -EEXIST;
struct kvm_stats_debugfs_item *p;

kvm_debugfs_dir = debugfs_create_dir("kvm", NULL);
Expand Down

0 comments on commit 0c8eb04

Please sign in to comment.