mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
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>
(cherry picked from commit 0c8eb04a62)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
This commit is contained in:
committed by
Christoffer Dall
parent
c0cdef185a
commit
e845f9d367
@@ -3010,7 +3010,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);
|
||||
|
||||
Reference in New Issue
Block a user