irqchip: mips-gic: Fix gic_set_affinity() return value

If the online CPU check in gic_set_affinity() fails, return a proper
errno value instead of -1.

Signed-off-by: Andrew Bresticker <[email protected]>
Acked-by: Jason Cooper <[email protected]>
Reviewed-by: Qais Yousef <[email protected]>
Tested-by: Qais Yousef <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Jeffrey Deans <[email protected]>
Cc: Markos Chandras <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Jonas Gorski <[email protected]>
Cc: John Crispin <[email protected]>
Cc: David Daney <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/7814/
Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
Andrew Bresticker 2014-09-18 14:47:22 -07:00 • committed by Ralf Baechle
commit 14d160ab72

View file

@ -309,7 +309,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
cpumask_and(&tmp, cpumask, cpu_online_mask);
if (cpus_empty(tmp))
return -1;
return -EINVAL;
/* Assumption : cpumask refers to a single CPU */
spin_lock_irqsave(&gic_lock, flags);