From patchwork Thu Mar 21 12:13:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 2313121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 9C604DF264 for ; Thu, 21 Mar 2013 12:16:31 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIeN8-0000hh-VE; Thu, 21 Mar 2013 12:13:30 +0000 Received: from mail.karo-electronics.de ([81.173.242.67]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIeN0-0000dg-Ll for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2013 12:13:27 +0000 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= To: linux-arm-kernel@lists.infradead.org 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 Message-Id: <1363867990-24593-1-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 1.7.2.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130321_081322_943635_51E23683 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.1 (-----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-5.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [81.173.242.67 listed in list.dnswl.org] -2.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Tony Lindgren , linux-omap@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 --- 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;