aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2018-09-08 06:07:26 -0400
committerThomas Gleixner <tglx@linutronix.de>2018-09-08 06:12:40 -0400
commit47b7360ce563e18c524ce92b55fb4da72b3b3578 (patch)
treeef6fae9f2718dca7d22a4689f752d638b0844aea
parent9fe6299dde587788f245e9f7a5a1b296fad4e8c7 (diff)
x86/apic/vector: Make error return value negative
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: 2db1f959d9dc ("x86/vector: Handle managed interrupts proper") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org
-rw-r--r--arch/x86/kernel/apic/vector.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 9f148e3d45b4..7654febd5102 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -413,7 +413,7 @@ static int activate_managed(struct irq_data *irqd)
413 if (WARN_ON_ONCE(cpumask_empty(vector_searchmask))) { 413 if (WARN_ON_ONCE(cpumask_empty(vector_searchmask))) {
414 /* Something in the core code broke! Survive gracefully */ 414 /* Something in the core code broke! Survive gracefully */
415 pr_err("Managed startup for irq %u, but no CPU\n", irqd->irq); 415 pr_err("Managed startup for irq %u, but no CPU\n", irqd->irq);
416 return EINVAL; 416 return -EINVAL;
417 } 417 }
418 418
419 ret = assign_managed_vector(irqd, vector_searchmask); 419 ret = assign_managed_vector(irqd, vector_searchmask);