Skip to contentSkip to conversation

ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()

PATCH New Wei Yongjun 2 participants 2 messages Oct 13, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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")

---
 arch/arm/mach-omap2/omap_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap_device.c +3 -1
index 713fc6b..d45cbfd 100644
@@ -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;
maintainer
#1 lore raw

PATCH 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 -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