Commit d683878d authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Tony Lindgren

ARM: OMAP3+: PRM: fix of_irq_get() result check

of_irq_get() may return 0 as well as a nagative error number on failure
(and never on success), however omap3xxx_prm_late_init() regards 0 as a
valid IRQ -- fix this.

Fixes: 1e037794 ("ARM: OMAP3+: PRM: register interrupt information from DT")
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 90de9634
......@@ -706,7 +706,7 @@ static int omap3xxx_prm_late_init(void)
np = of_find_matching_node(NULL, omap3_prm_dt_match_table);
if (np) {
irq_num = of_irq_get(np, 0);
if (irq_num >= 0)
if (irq_num > 0)
omap3_prcm_irq_setup.irq = irq_num;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment