]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 13 Oct 2017 09:29:25 +0000 (09:29 +0000)
committerTony Lindgren <tony@atomide.com>
Fri, 13 Oct 2017 17:07:40 +0000 (10:07 -0700)
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>
arch/arm/mach-omap2/omap_device.c

index 713fc6b4b894e9919739c62150d4397d75f3ea14..d45cbfdb4be6838b7f698886a84f4ceb48fe35f8 100644 (file)
@@ -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;