diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2017-08-15 18:53:18 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-08-15 18:53:18 +0300 |
commit | d683878dbeab3cd5cd073e40b41f24a4c7f62415 (patch) | |
tree | 1f8624c78188fff7ad00c4794fdf531fe5c43bf0 /arch/arm/mach-omap2 | |
parent | 90de9634a5d57b92d8af4ec23aa2c9b297ec8168 (diff) | |
download | linux-d683878dbeab3cd5cd073e40b41f24a4c7f62415.tar.xz |
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: 1e037794f7f ("ARM: OMAP3+: PRM: register interrupt information from DT")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/prm3xxx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 64f6451499a7..a2dd13217c89 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c @@ -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; } |