From patchwork Thu May 29 04:57:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 4259811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 142E0BF90B for ; Thu, 29 May 2014 05:02:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49AE8202F8 for ; Thu, 29 May 2014 05:02:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7BEBF2018A for ; Thu, 29 May 2014 05:02:38 +0000 (UTC) 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 1WpsSG-0005Wf-Pv; Thu, 29 May 2014 05:00:40 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpsRt-0004FP-Tp for linux-arm-kernel@lists.infradead.org; Thu, 29 May 2014 05:00:18 +0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so12414538pbb.33 for ; Wed, 28 May 2014 21:59:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UgZ1FQ7Zcn1iQe5SVf88Gs/dM/rjHBQx57D6USqZpCU=; b=ig4YdrSjIUEs/9cOXxob4RcMk1sDtXofo3kgD0/hiGa6nqwWZvrhoeM/hgsU0AJQYi 9BvP0RI6K1IKyf3IpWRatuCk/IF4/QyCAia6pbvVgHx6/NKw1d3dip+SO15oLg0bZ1dc JCuPQBMsaTuJdYGflXavgI8aycoJZ6u4vsaZ/cilNF7jUJXi94LO6LSZto6KLxkfOeXC 0a7ykSlSJ+jI1bu5hT1Y1e8JzDIobiddli64z0IY3k8RTOWSaI6QfB8T5UcMvjUFHm20 42C6JZgwXDmU99OYQ6zdpU74DW5Oi8aqNOAkENHQgeihGEkpDh3LCV679bmYiF4KjQBZ RVwg== X-Gm-Message-State: ALoCoQlc9JPeKO8ngAZqmgZGxvQ/jdRcnsRSh+MR5gtdcCLss304g97wGcqvHgXD823EkgCElB4V X-Received: by 10.68.241.68 with SMTP id wg4mr5679037pbc.66.1401339598087; Wed, 28 May 2014 21:59:58 -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.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 21:59:57 -0700 (PDT) From: Sachin Kamat To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/5] ARM: imx: Use PTR_ERR_OR_ZERO in mx31moboard-marxbot.c Date: Thu, 29 May 2014 10:27:13 +0530 Message-Id: <1401339434-26085-4-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_220018_020875_D89D0A74 X-CRM114-Status: GOOD ( 11.53 ) X-Spam-Score: -0.7 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Sachin Kamat --- arch/arm/mach-imx/mx31moboard-marxbot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mx31moboard-marxbot.c b/arch/arm/mach-imx/mx31moboard-marxbot.c index 699d01a4fef8..2e62192394c1 100644 --- a/arch/arm/mach-imx/mx31moboard-marxbot.c +++ b/arch/arm/mach-imx/mx31moboard-marxbot.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -328,10 +329,8 @@ static int __init marxbot_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); } static const struct fsl_usb2_platform_data usb_pdata __initconst = {