From: Wei Yongjun Date: Fri, 13 Oct 2017 09:29:25 +0000 (+0000) Subject: ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources() X-Git-Tag: Ubuntu-5.10.0-12.13~8991^2~16^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=552ee3021cd79feb4203df1d594533fa9c8e1595;p=mirror_ubuntu-hirsute-kernel.git 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 Signed-off-by: Tony Lindgren --- 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, 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;