Skip to contentSkip to conversation

ARM: OMAP: fix type of return values in omap_device_get_by_hwmod_name()

PATCH In review Lothar Waßmann 2 participants 2 messages Mar 21, 2013 – Mar 22, 2013

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

PATCH 1/1 ARM: OMAP: fix type of return values in omap_device_get_by_hwmod_name()

The merge bda5e141fbe96295c669692114d18687730269fb erroneously changed the return value of some error exits of omap_device_get_by_hwmod_name() from ERR_PTR() to -ENODEV.

This fixes the warnings:
arch/arm/mach-omap2/omap_device.c: In function 'omap_device_get_by_hwmod_name':
arch/arm/mach-omap2/omap_device.c:821:3: warning: return makes pointer from integer without a cast arch/arm/mach-omap2/omap_device.c:826:3: warning: return makes pointer from integer without a cast

---
 arch/arm/mach-omap2/omap_device.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/omap_device.c +2 -2
index 2448c7a..eeea4fa 100644
@@ -818,12 +818,12 @@ struct device *omap_device_get_by_hwmod_name(const char *oh_name)
 	if (!oh) {
 		WARN(1, "%s: no hwmod for %s\n", __func__,
 			oh_name);
-		return -ENODEV;
+		return ERR_PTR(-ENODEV);
 	}
 	if (!oh->od) {
 		WARN(1, "%s: no omap_device for %s\n", __func__,
 			oh_name);
-		return -ENODEV;
+		return ERR_PTR(-ENODEV);
 	}
 
 	return &oh->od->pdev->dev;
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 1 line · Lothar Wa?mann

The merge bda5e141fbe96295c669692114d18687730269fb erroneously changed

Don't forget that commit's description as well...