From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
"Tony Lindgren" <tony@atomide.com>,
"Russell King" <linux@arm.linux.org.uk>,
"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [BUGFIX PATCH] ARM: OMAP: fix type of return values in omap_device_get_by_hwmod_name()
Date: Thu, 21 Mar 2013 13:13:10 +0100 [thread overview]
Message-ID: <1363867990-24593-1-git-send-email-LW@KARO-electronics.de> (raw)
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@KARO-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
next reply other threads:[~2013-03-21 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 12:13 Lothar Waßmann [this message]
2013-03-22 16:36 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363867990-24593-1-git-send-email-LW@KARO-electronics.de \
--to=lw@karo-electronics.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®