ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- arch/arm/mach-omap2/omap_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap_device.c +3 -1
@@ -433,8 +433,10 @@ void omap_device_delete(struct omap_device *od) irq =irq_of_parse_and_map (child,0 );if (!irq) irq =irq_of_parse_and_map (np,0 ); -if (!irq) +if (!irq) { + error = -EINVAL ; goto free; + }/* Legacy DMA code needs interrupt name to be "0" */ res[1 ].start = irq;
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
Quoted 2 lines · Wei Yongjun
Fix to return error code
-EINVALfrom theirq_of_parse_and_map()error handling case instead of 0, as done elsewhere in this function.
Thanks applying into omap-for-v4.15/ti-sysc.
Regards,
Tony