Commit 552ee302 authored by Wei Yongjun's avatar Wei Yongjun Committed by Tony Lindgren

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: d85a2d61 ("ARM: OMAP2+: Populate legacy resources for dma
and smartreflex")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 9cffb1a0
...@@ -433,8 +433,10 @@ omap_device_copy_resources(struct omap_hwmod *oh, ...@@ -433,8 +433,10 @@ omap_device_copy_resources(struct omap_hwmod *oh,
irq = irq_of_parse_and_map(child, 0); irq = irq_of_parse_and_map(child, 0);
if (!irq) if (!irq)
irq = irq_of_parse_and_map(np, 0); irq = irq_of_parse_and_map(np, 0);
if (!irq) if (!irq) {
error = -EINVAL;
goto free; goto free;
}
/* Legacy DMA code needs interrupt name to be "0" */ /* Legacy DMA code needs interrupt name to be "0" */
res[1].start = irq; res[1].start = irq;
......
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