Skip to content

Commit d99ba44

Browse files
dtorJason Cooper
authored andcommitted
irqchip: brcmstb-l2: Fix error handling of irq_of_parse_and_map
Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating failure, so testing for negative result never works. Signed-off-by: Dmitry Torokhov <[email protected]> Acked-by: Florian Fainelli <[email protected]> Tested-by: Kevin Cernekee <[email protected]> Link: https://lkml.kernel.org/r/20141114221642.GA37468@dtor-ws Signed-off-by: Jason Cooper <[email protected]>
1 parent 714710e commit d99ba44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/irqchip/irq-brcmstb-l2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ int __init brcmstb_l2_intc_of_init(struct device_node *np,
135135
__raw_writel(0xffffffff, data->base + CPU_CLEAR);
136136

137137
data->parent_irq = irq_of_parse_and_map(np, 0);
138-
if (data->parent_irq < 0) {
138+
if (!data->parent_irq) {
139139
pr_err("failed to find parent interrupt\n");
140-
ret = data->parent_irq;
140+
ret = -EINVAL;
141141
goto out_unmap;
142142
}
143143

0 commit comments

Comments
 (0)