From: Paolo Bonzini Date: Wed, 30 Oct 2013 11:12:13 +0000 (+0100) Subject: KVM: use a more sensible error number when debugfs directory creation fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c8eb04a6241da28deb108181213b791c378123b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Paolo Bonzini --- 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[] = { 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);