Skip to content

Commit

Permalink
x86/apic/vector: Make error return value negative
Browse files Browse the repository at this point in the history
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: 2db1f95 ("x86/vector: Handle managed interrupts proper")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
  • Loading branch information
Thomas Gleixner committed Sep 8, 2018
1 parent 9fe6299 commit 47b7360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/apic/vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 47b7360

Please sign in to comment.