aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_device.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-10-13 05:29:25 -0400
committerTony Lindgren <tony@atomide.com>2017-10-13 13:07:40 -0400
commit552ee3021cd79feb4203df1d594533fa9c8e1595 (patch)
treee3db0719751af4e850c99ee5e617b5e181b15d3a /arch/arm/mach-omap2/omap_device.c
parent9cffb1a0504ddc7b291cf882002ee4a794eb3fec (diff)
ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
Fix to return error code -EINVAL from the irq_of_parse_and_map() error handling case instead of 0, as done elsewhere in this function. Fixes: d85a2d61432a ("ARM: OMAP2+: Populate legacy resources for dma and smartreflex") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_device.c')
-rw-r--r--arch/arm/mach-omap2/omap_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 713fc6b4b894..d45cbfdb4be6 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -433,8 +433,10 @@ omap_device_copy_resources(struct omap_hwmod *oh,
433 irq = irq_of_parse_and_map(child, 0); 433 irq = irq_of_parse_and_map(child, 0);
434 if (!irq) 434 if (!irq)
435 irq = irq_of_parse_and_map(np, 0); 435 irq = irq_of_parse_and_map(np, 0);
436 if (!irq) 436 if (!irq) {
437 error = -EINVAL;
437 goto free; 438 goto free;
439 }
438 440
439 /* Legacy DMA code needs interrupt name to be "0" */ 441 /* Legacy DMA code needs interrupt name to be "0" */
440 res[1].start = irq; 442 res[1].start = irq;