diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2017-08-15 08:53:28 -0700 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-08-15 08:53:28 -0700 |
commit | 879dce79531ea82f78d662c4651be07761c6e41a (patch) | |
tree | 54c1ab32b00ac36635b0628faf34d9a85dc2a010 /arch/arm/mach-omap2 | |
parent | d683878dbeab3cd5cd073e40b41f24a4c7f62415 (diff) |
ARM: OMAP4+: PRM: fix of_irq_get() result checks
of_irq_get() may return 0 as well as a nagative error number on failure,
(and never on success), however omap44xx_prm_late_init() regards 0 as a
valid IRQ -- fix this.
Fixes: a8f83aefcd5a ("ARM: OMAP4+: PRM: register interrupt information from DT")
Fixes: c5b3955828ba ("ARM: OMAP4: Fix legacy code clean-up regression")
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/prm44xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 3ab5df1ce900..1c0c1663f078 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c @@ -747,7 +747,7 @@ static int omap44xx_prm_late_init(void) * Already have OMAP4 IRQ num. For all other platforms, we need * IRQ numbers from DT */ - if (irq_num < 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) { + if (irq_num <= 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) { if (irq_num == -EPROBE_DEFER) return irq_num; @@ -756,7 +756,7 @@ static int omap44xx_prm_late_init(void) } /* Once OMAP4 DT is filled as well */ - if (irq_num >= 0) { + if (irq_num > 0) { omap4_prcm_irq_setup.irq = irq_num; omap4_prcm_irq_setup.xlate_irq = NULL; } |