From patchwork Tue Mar 12 07:58:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Silviu-Mihai Popescu X-Patchwork-Id: 2253731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 12D823FCF6 for ; Tue, 12 Mar 2013 08:01:06 +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 1UFK6a-0008Bz-4w; Tue, 12 Mar 2013 07:58:40 +0000 Received: from mail-wg0-f54.google.com ([74.125.82.54]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFK6V-0008B3-Sv for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2013 07:58:36 +0000 Received: by mail-wg0-f54.google.com with SMTP id fm10so5664930wgb.21 for ; Tue, 12 Mar 2013 00:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=L192mV8wrh293mlJsEFrg+HUL8Klhl905605TOlcXbo=; b=wNUd4hlIaUiW1oEXPqe0VR+38+KfSZg8fblC+I2NNCMQEISoGyHUsuQpWwJcGeLL6K JjtZCzD3XhM88C1865ukHvHyTCQq1satJOLNRqv7jwyNfiv3lV6Y9A7hQjKrzO3D3Ik4 nZF8ao7xod3CezezTMB3uVlt8CrX3sXD/gQpTlNR0Wd0xvKuPznBsSKFZdAD7Vn6KLkK HzDYY5pUoRKgVgBrIXKv3zMSp6sWxumHpkL1jWXlflpWhThv1IyLupBgJnCKUHnFSbvD 2wG40MDbQvhDW1mxUwmynyhweIJPlWQJ2eT0qjPwfObnEXur1GaZQKXrC3Ql91T6rWve Qt4A== X-Received: by 10.194.7.196 with SMTP id l4mr24372842wja.28.1363075112646; Tue, 12 Mar 2013 00:58:32 -0700 (PDT) Received: from localhost.localdomain (p5.eregie.pub.ro. [141.85.0.105]) by mx.google.com with ESMTPS id ej8sm20239034wib.9.2013.03.12.00.58.30 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 00:58:31 -0700 (PDT) From: Silviu-Mihai Popescu To: linux-omap@vger.kernel.org Subject: [PATCH] mach_omap2: use PTR_RET instead of IS_ERR + PTR_ERR Date: Tue, 12 Mar 2013 09:58:29 +0200 Message-Id: <1363075109-27038-1-git-send-email-silviupopescu1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130312_035836_143891_CEFB8066 X-CRM114-Status: GOOD ( 11.22 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (silviupopescu1990[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.54 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (silviupopescu1990[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: khilman@ti.com, linux@arm.linux.org.uk, tony@atomide.com, linux-kernel@vger.kernel.org, Silviu-Mihai Popescu , linux-arm-kernel@lists.infradead.org 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase readability. Signed-off-by: Silviu-Mihai Popescu --- arch/arm/mach-omap2/devices.c | 4 ++-- arch/arm/mach-omap2/fb.c | 5 +---- arch/arm/mach-omap2/gpmc.c | 2 +- arch/arm/mach-omap2/pmu.c | 5 +---- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 1ec7f05..2a0816e 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -66,7 +66,7 @@ static int __init omap3_l3_init(void) WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); - return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; + return PTR_RET(pdev); } omap_postcore_initcall(omap3_l3_init); @@ -100,7 +100,7 @@ static int __init omap4_l3_init(void) WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); - return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; + return PTR_RET(pdev); } omap_postcore_initcall(omap4_l3_init); diff --git a/arch/arm/mach-omap2/fb.c b/arch/arm/mach-omap2/fb.c index 190ae49..2ca33cc 100644 --- a/arch/arm/mach-omap2/fb.c +++ b/arch/arm/mach-omap2/fb.c @@ -83,10 +83,7 @@ static int __init omap_init_vrfb(void) pdev = platform_device_register_resndata(NULL, "omapvrfb", -1, res, num_res, NULL, 0); - if (IS_ERR(pdev)) - return PTR_ERR(pdev); - else - return 0; + return PTR_RET(pdev); } omap_arch_initcall(omap_init_vrfb); diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 410e1ba..c665721 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1448,7 +1448,7 @@ static int __init omap_gpmc_init(void) pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0); WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); - return IS_ERR(pdev) ? PTR_ERR(pdev) : 0; + return PTR_RET(pdev); } omap_postcore_initcall(omap_gpmc_init); diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c index 9debf82..13ff2f5 100644 --- a/arch/arm/mach-omap2/pmu.c +++ b/arch/arm/mach-omap2/pmu.c @@ -52,10 +52,7 @@ static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) WARN(IS_ERR(omap_pmu_dev), "Can't build omap_device for %s.\n", dev_name); - if (IS_ERR(omap_pmu_dev)) - return PTR_ERR(omap_pmu_dev); - - return 0; + return PTR_RET(omap_pmu_dev); } static int __init omap_init_pmu(void)