summaryrefslogtreecommitdiff
path: root/arch/mips/cavium-octeon/octeon-irq.c
diff options
context:
space:
mode:
authorMenglong Dong <dong.menglong@zte.com.cn>2021-01-11 05:27:25 -0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-01-13 10:59:32 +0100
commit7b490a8ab0f2d3ab8d838a4ff22ae86edafd34a1 (patch)
treeda4e0ddf83415e6b1722923264bbb40a631a7768 /arch/mips/cavium-octeon/octeon-irq.c
parent69e976831cd53f9ba304fd20305b2025ecc78eab (diff)
MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu
The type of 'r' in octeon_irq_init_ciu is 'unsigned int', so 'r < 0' can't be true. Fix this by change the type of 'r' and 'i' from 'unsigned int' to 'int'. As 'i' won't be negative, this change works. Fixes: 99fbc70f8547 ("MIPS: Octeon: irq: Alloc desc before configuring IRQ") Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/cavium-octeon/octeon-irq.c')
-rw-r--r--arch/mips/cavium-octeon/octeon-irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index bd47e15d02c7..be5d4afcd30f 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -1444,7 +1444,7 @@ static void octeon_irq_setup_secondary_ciu2(void)
static int __init octeon_irq_init_ciu(
struct device_node *ciu_node, struct device_node *parent)
{
- unsigned int i, r;
+ int i, r;
struct irq_chip *chip;
struct irq_chip *chip_edge;
struct irq_chip *chip_mbox;