diff mbox

[-next] ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()

Message ID 1507886965-156349-1-git-send-email-weiyongjun1@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Yongjun Oct. 13, 2017, 9:29 a.m. UTC
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>
---
 arch/arm/mach-omap2/omap_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tony Lindgren Oct. 13, 2017, 5:08 p.m. UTC | #1
* Wei Yongjun <weiyongjun1@huawei.com> [171013 02:26]:
> 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.

Thanks applying into omap-for-v4.15/ti-sysc.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 713fc6b..d45cbfd 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -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;