KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu
authorEric Auger <eric.auger@linaro.org>
Mon, 15 Dec 2014 17:43:32 +0000 (18:43 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Sun, 11 Jan 2015 13:12:15 +0000 (14:12 +0100)
To be more explicit on vgic initialization failure, -ENODEV is
returned by vgic_init when no online vcpus can be found at init.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic.c

index 03affc7..b8d57e8 100644 (file)
@@ -1809,7 +1809,7 @@ static int vgic_init(struct kvm *kvm)
 
        nr_cpus = dist->nr_cpus = atomic_read(&kvm->online_vcpus);
        if (!nr_cpus)           /* No vcpus? Can't be good... */
-               return -EINVAL;
+               return -ENODEV;
 
        /*
         * If nobody configured the number of interrupts, use the