]> git.baikalelectronics.ru Git - kernel.git/commitdiff
x86/apic/vector: Make error return value negative
authorThomas Gleixner <tglx@linutronix.de>
Sat, 8 Sep 2018 10:07:26 +0000 (12:07 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 8 Sep 2018 10:12:40 +0000 (12:12 +0200)
activate_managed() returns EINVAL instead of -EINVAL in case of
error. While this is unlikely to happen, the positive return value would
cause further malfunction at the call site.

Fixes: b1bfe017ea2d ("x86/vector: Handle managed interrupts proper")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
arch/x86/kernel/apic/vector.c

index 9f148e3d45b4fe2ec57eecf5bd13ba528f97fa37..7654febd510277bedf28f8cef6a5d599bcfe1f5c 100644 (file)
@@ -413,7 +413,7 @@ static int activate_managed(struct irq_data *irqd)
        if (WARN_ON_ONCE(cpumask_empty(vector_searchmask))) {
                /* Something in the core code broke! Survive gracefully */
                pr_err("Managed startup for irq %u, but no CPU\n", irqd->irq);
-               return EINVAL;
+               return -EINVAL;
        }
 
        ret = assign_managed_vector(irqd, vector_searchmask);