Commit a83479545d0e693da0886fd28d041d3a5c1bc966
Committed by
Ralf Baechle
1 parent
bc45eb8950
Exists in
master
and in
7 other branches
[MIPS] VR41xx: unsigned irq cannot be negative
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
arch/mips/vr41xx/common/irq.c
... | ... | @@ -72,6 +72,7 @@ |
72 | 72 | cascade = irq_cascade + irq; |
73 | 73 | if (cascade->get_irq != NULL) { |
74 | 74 | unsigned int source_irq = irq; |
75 | + int ret; | |
75 | 76 | desc = irq_desc + source_irq; |
76 | 77 | if (desc->chip->mask_ack) |
77 | 78 | desc->chip->mask_ack(source_irq); |
... | ... | @@ -79,8 +80,9 @@ |
79 | 80 | desc->chip->mask(source_irq); |
80 | 81 | desc->chip->ack(source_irq); |
81 | 82 | } |
82 | - irq = cascade->get_irq(irq); | |
83 | - if (irq < 0) | |
83 | + ret = cascade->get_irq(irq); | |
84 | + irq = ret; | |
85 | + if (ret < 0) | |
84 | 86 | atomic_inc(&irq_err_count); |
85 | 87 | else |
86 | 88 | irq_dispatch(irq); |