From patchwork Fri Apr 11 08:36:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duan Jiong X-Patchwork-Id: 3967251 Return-Path: X-Original-To: patchwork-dri-devel@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 3D5FBC1A41 for ; Fri, 11 Apr 2014 10:02:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7DC512080F for ; Fri, 11 Apr 2014 10:02:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0455D2082B for ; Fri, 11 Apr 2014 10:02:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A9A108A568; Fri, 11 Apr 2014 03:02:26 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 597 seconds by postgrey-1.34 at gabe; Fri, 11 Apr 2014 01:48:24 PDT Received: from heian.cn.fujitsu.com (unknown [59.151.112.132]) by gabe.freedesktop.org (Postfix) with ESMTP id A8BA36ED52 for ; Fri, 11 Apr 2014 01:48:24 -0700 (PDT) X-IronPort-AV: E=Sophos;i="4.97,840,1389715200"; d="scan'208";a="29141484" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 11 Apr 2014 16:36:14 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s3B8cbA1014968; Fri, 11 Apr 2014 16:38:37 +0800 Received: from duanjiong.fnst.cn.fujitsu.com (10.167.225.86) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.146.2; Fri, 11 Apr 2014 16:38:38 +0800 From: Duan Jiong To: Subject: [PATCH] drm/tegra: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Date: Fri, 11 Apr 2014 16:36:41 +0800 Message-ID: <1397205401-24148-1-git-send-email-duanj.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.225.86] X-Mailman-Approved-At: Fri, 11 Apr 2014 03:02:25 -0700 Cc: linux-tegra@vger.kernel.org, Duan Jiong , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- drivers/gpu/drm/tegra/gem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index bcf9895..89aebe2 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -268,10 +268,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm, bo = tegra_bo_create_with_handle(file, drm, args->size, 0, &args->handle); - if (IS_ERR(bo)) - return PTR_ERR(bo); - - return 0; + return PTR_ERR_OR_ZERO(bo); } int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,