aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-10-30 07:12:13 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2013-10-30 07:15:34 -0400
commit0c8eb04a6241da28deb108181213b791c378123b (patch)
tree5b93f4f81a51a1118ad271c8a94b414c3d6859d2 /virt
parentd780a31271b2f455cb4b83eb018ecfb1c28ef5c1 (diff)
KVM: use a more sensible error number when debugfs directory creation 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 <tim.gardner@canonical.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index a9dd682cf5e3..1cf9ccb01013 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3091,7 +3091,7 @@ static const struct file_operations *stat_fops[] = {
3091 3091
3092static int kvm_init_debug(void) 3092static int kvm_init_debug(void)
3093{ 3093{
3094 int r = -EFAULT; 3094 int r = -EEXIST;
3095 struct kvm_stats_debugfs_item *p; 3095 struct kvm_stats_debugfs_item *p;
3096 3096
3097 kvm_debugfs_dir = debugfs_create_dir("kvm", NULL); 3097 kvm_debugfs_dir = debugfs_create_dir("kvm", NULL);