From patchwork Thu May 29 04:57:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 31082 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 911BC20068 for ; Thu, 29 May 2014 05:02:04 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wm4sf58610856obc.2 for ; Wed, 28 May 2014 22:02:04 -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 :in-reply-to:references: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=/wHfX6dgCo+4X8xybZcaUxq5YYuFMydfu5utF1S2F58=; b=g4wJrQvt3WPiaY9+gal7S+X8RT5nK8OF3UfIe0MalyWqV49V9ER9osFZA+W+cK88ws 56NqBf4JuCe5y+tOocfQz/dMT6wqpOMHtZy2DiT3Qi50EDqOizDb25NhAakwdpfrz6Aa uWIcaAHbWDNpFB4rhbnLXcC4f4LX7VKXxnIZJIH75yv9GNXAjLNbZl721ndLIe177osJ 3mSuoMVXIwqGVytXlxqpRoSkQQiiMQcI9sPbydRp5V/O6LXtRpam7lzg1YDIyF7iXoXu SuCky2RSRVd+jffDOvtBTJ0bNqZGeEChB/MGDgV+4EZA3kKInUNZYi8ygxy4BGRwqpgR DA6w== X-Gm-Message-State: ALoCoQmaUvwX+u5xPmGb9vSzmqg+OMbkmpk5UFmtobNRa/LN3I7qT5YT+KqvLBGNGdVKZQpKgDSa X-Received: by 10.43.165.202 with SMTP id mx10mr1925773icc.34.1401339724153; Wed, 28 May 2014 22:02:04 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.37 with SMTP id g34ls409506qgd.64.gmail; Wed, 28 May 2014 22:02:04 -0700 (PDT) X-Received: by 10.220.103.141 with SMTP id k13mr4229395vco.25.1401339723726; Wed, 28 May 2014 22:02:03 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id vn1si12459312veb.34.2014.05.28.22.02.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 22:02:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id id10so1434804vcb.34 for ; Wed, 28 May 2014 22:02:03 -0700 (PDT) X-Received: by 10.220.167.2 with SMTP id o2mr4542181vcy.8.1401339723643; Wed, 28 May 2014 22:02:03 -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 ib8csp227vcb; Wed, 28 May 2014 22:02:03 -0700 (PDT) X-Received: by 10.224.24.134 with SMTP id v6mr6365241qab.88.1401339723207; Wed, 28 May 2014 22:02:03 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id m10si24421650qco.33.2014.05.28.22.02.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 May 2014 22:02:03 -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 1WpsS7-0005Sz-J3; Thu, 29 May 2014 05:00:31 +0000 Received: from mail-pb0-f43.google.com ([209.85.160.43]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpsRr-0004Eg-Vi for linux-arm-kernel@lists.infradead.org; Thu, 29 May 2014 05:00:16 +0000 Received: by mail-pb0-f43.google.com with SMTP id up15so12333680pbc.16 for ; Wed, 28 May 2014 21:59:55 -0700 (PDT) X-Received: by 10.68.139.137 with SMTP id qy9mr5440296pbb.11.1401339595178; Wed, 28 May 2014 21:59:55 -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.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 21:59:54 -0700 (PDT) From: Sachin Kamat To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-devboard.c Date: Thu, 29 May 2014 10:27:12 +0530 Message-Id: <1401339434-26085-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1401339434-26085-1-git-send-email-sachin.kamat@linaro.org> References: <1401339434-26085-1-git-send-email-sachin.kamat@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140528_220016_053536_14675D03 X-CRM114-Status: GOOD ( 11.42 ) 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.160.43 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.175 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/mx31moboard-devboard.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mx31moboard-devboard.c b/arch/arm/mach-imx/mx31moboard-devboard.c index 1e4ea1640a2a..a85377f52647 100644 --- a/arch/arm/mach-imx/mx31moboard-devboard.c +++ b/arch/arm/mach-imx/mx31moboard-devboard.c @@ -12,6 +12,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -214,10 +215,8 @@ static int __init devboard_usbh1_init(void) usbh1_pdata.otg = phy; pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); - if (IS_ERR(pdev)) - return PTR_ERR(pdev); - return 0; + return PTR_ERR_OR_ZERO(pdev); }