From patchwork Thu May 29 04:57:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 31081 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 13B4320068 for ; Thu, 29 May 2014 05:02:00 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 29sf51715907yhl.6 for ; Wed, 28 May 2014 22:02:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=lfjzdZS2yntvnIg2/ftCRX/2vka3JG3gOVmILbG/nQ4=; b=ertXXx6yBG7SoX0AEms+1rdrP5bcVUwLZy/EVYKh3OhzFERNeDJM48OsntOMZXqcRj /Fa3KBNHDK6c9EzjNxMT1yGGXGhZbCbWdDu+uNy/5ReFDWLIVCV6UgVVHR/7idcL+nsi RZdc9WqaTDcHo1EuEtq6ohUeAZqOIax3H2pAcyJFxRsNpvUOigwArroPqu+syTmviXGI kE2U+bjBMWhWhljZ6iu+wd8GXVg5Cg9u1BK1Cyj+c7z5Yeb8E5kcw85J6H+CKK1eCfgO SpYv15HnsecGFlrei3pmdxSaLqFlrb/DqdF17mKqKNL3AQePn/8aJt47EAb4OT5RdiGv of2g== X-Gm-Message-State: ALoCoQm+6HI2myDUJiS9Sl7xvZJAXVNJsYtRlMTdCOCdgaPKtooICiBjIH3A8xUbRpXRQEBwAinq X-Received: by 10.58.69.78 with SMTP id c14mr2074966veu.41.1401339720684; Wed, 28 May 2014 22:02:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.138 with SMTP id n10ls444006qgd.4.gmail; Wed, 28 May 2014 22:02:00 -0700 (PDT) X-Received: by 10.220.139.198 with SMTP id f6mr129119vcu.47.1401339720576; Wed, 28 May 2014 22:02:00 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id ef2si8156391vdc.41.2014.05.28.22.02.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 22:02:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ij19so10148853vcb.37 for ; Wed, 28 May 2014 22:02:00 -0700 (PDT) X-Received: by 10.58.216.34 with SMTP id on2mr4513371vec.22.1401339720499; Wed, 28 May 2014 22:02:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp223vcb; Wed, 28 May 2014 22:02:00 -0700 (PDT) X-Received: by 10.140.80.67 with SMTP id b61mr5896585qgd.98.1401339720100; Wed, 28 May 2014 22:02:00 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id u8si24652889qgu.44.2014.05.28.22.01.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 May 2014 22:02:00 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpsRr-0005NI-A1; Thu, 29 May 2014 05:00:15 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpsRn-0004Da-Dp for linux-arm-kernel@lists.infradead.org; Thu, 29 May 2014 05:00:11 +0000 Received: by mail-pa0-f54.google.com with SMTP id bj1so12303423pad.27 for ; Wed, 28 May 2014 21:59:49 -0700 (PDT) X-Received: by 10.66.164.135 with SMTP id yq7mr5560878pab.126.1401339589513; Wed, 28 May 2014 21:59:49 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id xc1sm98319530pab.39.2014.05.28.21.59.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 21:59:48 -0700 (PDT) From: Sachin Kamat To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/5] ARM: imx: Use PTR_ERR_OR_ZERO in platform-mxc_rnga.c Date: Thu, 29 May 2014 10:27:10 +0530 Message-Id: <1401339434-26085-1-git-send-email-sachin.kamat@linaro.org> 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-20140528_220011_498686_D15B5407 X-CRM114-Status: GOOD ( 11.23 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.54 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Cc: sachin.kamat@linaro.org, linux@arm.linux.org.uk, kernel@pengutronix.de, shawn.guo@freescale.com 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Sachin Kamat --- arch/arm/mach-imx/devices/platform-mxc_rnga.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/devices/platform-mxc_rnga.c b/arch/arm/mach-imx/devices/platform-mxc_rnga.c index c58404badb59..33d58ca2001a 100644 --- a/arch/arm/mach-imx/devices/platform-mxc_rnga.c +++ b/arch/arm/mach-imx/devices/platform-mxc_rnga.c @@ -6,6 +6,7 @@ * the terms of the GNU General Public License version 2 as published by the * Free Software Foundation. */ +#include #include "../hardware.h" #include "devices-common.h" @@ -48,9 +49,6 @@ static int __init imxXX_add_mxc_rnga(void) #endif /* if defined(CONFIG_SOC_IMX31) */ ret = ERR_PTR(-ENODEV); - if (IS_ERR(ret)) - return PTR_ERR(ret); - - return 0; + return PTR_ERR_OR_ZERO(ret); } arch_initcall(imxXX_add_mxc_rnga);