From patchwork Tue Aug 7 06:57:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Meyer X-Patchwork-Id: 1292981 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id B36643FCFC for ; Wed, 8 Aug 2012 07:40:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B68F69EF75 for ; Wed, 8 Aug 2012 00:40:40 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from www17.your-server.de (www17.your-server.de [213.133.104.17]) by gabe.freedesktop.org (Postfix) with ESMTP id 96D5C9F655 for ; Tue, 7 Aug 2012 00:41:34 -0700 (PDT) Received: from [88.68.99.129] (helo=[192.168.2.108]) by www17.your-server.de with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.74) (envelope-from ) id 1SydmE-0005pC-MK; Tue, 07 Aug 2012 09:00:26 +0200 Subject: [PATCH] drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1] From: Thomas Meyer To: airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Mime-Version: 1.0 Date: Tue, 07 Aug 2012 08:57:25 +0200 Message-ID: <1344322645.14513.124.camel@localhost.localdomain> X-Mailer: Evolution 3.4.3 (3.4.3-2.fc17) X-Authenticated-Sender: thomas@m3y3r.de X-Virus-Scanned: Clear (ClamAV 0.97.3/15226/Mon Aug 6 21:23:45 2012) X-Mailman-Approved-At: Tue, 07 Aug 2012 23:08:06 -0700 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer diff -u -p a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c --- a/drivers/gpu/drm/udl/udl_gem.c +++ b/drivers/gpu/drm/udl/udl_gem.c @@ -308,7 +308,7 @@ struct drm_gem_object *udl_gem_prime_imp /* need to attach */ attach = dma_buf_attach(dma_buf, dev->dev); if (IS_ERR(attach)) - return ERR_PTR(PTR_ERR(attach)); + return ERR_CAST(attach); sg = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); if (IS_ERR(sg)) {