lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363867990-24593-1-git-send-email-LW@KARO-electronics.de>
Date:	Thu, 21 Mar 2013 13:13:10 +0100
From:	Lothar Waßmann <LW@...O-electronics.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	Tony Lindgren <tony@...mide.com>,
	Russell King <linux@....linux.org.uk>,
	Lothar Waßmann <LW@...O-electronics.de>
Subject: [BUGFIX PATCH] 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


Signed-off-by: Lothar Waßmann <LW@...O-electronics.de>
---
 arch/arm/mach-omap2/omap_device.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 2448c7a..eeea4fa 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -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;
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ