From patchwork Thu Jul 3 12:03:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 33032 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7B162203AC for ; Thu, 3 Jul 2014 16:25:30 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf2532551pab.11 for ; Thu, 03 Jul 2014 09:25:29 -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:delivered-to:from:to:subject:date :message-id:cc:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=uA9IDhYh+XMDZVMlpWmKXmKxtSNP0d8M7DBln6s0sUQ=; b=FjyFUvngIwiQLv5RNVvnWbMqQ4IEgr9xPBzKdvpbqNqMSVBJkM/tMHRDQQlIv64cmI JZlVh7LCErTWd/O8bkBBmdCaZU0LfTWE4qXe6488M2+0AsK66HF1BjoOO8Oonmx1zMqj LAX2B7sNWFK4U1P9nqi00yPNWmKkSS5F61UOWh6sYFisQq+GBM6pHxiKZ/SL8x94XVIc KVzDw+f3a2B1JB+se0VfvCe+oTjPlniFR3WKv1utR5Ap88aBbihl92N4DTlnPXZo6WDi piQrYqtZ0fA5JkCeSGny6ZZiwSx39Ug3FjZ+5UlYET2s9fcAM3T/nOwhWxsEHF4IeF50 x2Iw== X-Gm-Message-State: ALoCoQkF2DsQo/fPugQ7QlBS9wP3H92H3yCjHQkbCEML7wAQLTTVyK4YdNfVvgsG0kRw8pfaEe/g X-Received: by 10.66.154.233 with SMTP id vr9mr1140694pab.36.1404404729687; Thu, 03 Jul 2014 09:25:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.210 with SMTP id 76ls520126qgp.33.gmail; Thu, 03 Jul 2014 09:25:29 -0700 (PDT) X-Received: by 10.220.80.70 with SMTP id s6mr1425327vck.44.1404404729581; Thu, 03 Jul 2014 09:25:29 -0700 (PDT) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [2607:f8b0:400c:c01::22b]) by mx.google.com with ESMTPS id hk8si14373348vdb.79.2014.07.03.09.25.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Jul 2014 09:25:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::22b as permitted sender) client-ip=2607:f8b0:400c:c01::22b; Received: by mail-ve0-f171.google.com with SMTP id jz11so486985veb.2 for ; Thu, 03 Jul 2014 09:25:29 -0700 (PDT) X-Received: by 10.58.187.19 with SMTP id fo19mr1404748vec.45.1404404729489; Thu, 03 Jul 2014 09:25:29 -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.221.37.5 with SMTP id tc5csp390244vcb; Thu, 3 Jul 2014 09:25:28 -0700 (PDT) X-Received: by 10.70.50.36 with SMTP id z4mr5087894pdn.26.1404404727389; Thu, 03 Jul 2014 09:25:27 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id ea2si19974670pbc.169.2014.07.03.09.25.25 for ; Thu, 03 Jul 2014 09:25:27 -0700 (PDT) Received-SPF: none (google.com: dri-devel-bounces@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 807D36E729; Thu, 3 Jul 2014 09:25:18 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D0226E14B for ; Thu, 3 Jul 2014 05:07:07 -0700 (PDT) Received: by mail-pa0-f52.google.com with SMTP id eu11so117993pac.39 for ; Thu, 03 Jul 2014 05:07:07 -0700 (PDT) X-Received: by 10.70.101.234 with SMTP id fj10mr3814869pdb.61.1404389226940; Thu, 03 Jul 2014 05:07:06 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id su8sm40840987pbc.72.2014.07.03.05.07.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Jul 2014 05:07:06 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH Resend 1/1] drm: gem_cma: Use ERR_CAST helper Date: Thu, 3 Jul 2014 17:33:33 +0530 Message-Id: <1404389013-9721-1-git-send-email-sachin.kamat@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Mailman-Approved-At: Thu, 03 Jul 2014 09:25:17 -0700 Cc: Sachin Kamat , spk.linux@gmail.com X-BeenThere: dri-devel@lists.freedesktop.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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Original-Sender: sachin.kamat@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::22b as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Sachin Kamat Makes the code a bit more readable. Signed-off-by: Sachin Kamat Signed-off-by: Sachin Kamat Acked-by: Laurent Pinchart --- drivers/gpu/drm/drm_gem_cma_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c index 05c97c5350a1..e467e67af6e7 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -327,7 +327,7 @@ drm_gem_cma_prime_import_sg_table(struct drm_device *dev, size_t size, /* Create a CMA GEM buffer. */ cma_obj = __drm_gem_cma_create(dev, size); if (IS_ERR(cma_obj)) - return ERR_PTR(PTR_ERR(cma_obj)); + return ERR_CAST(cma_obj); cma_obj->paddr = sg_dma_address(sgt->sgl); cma_obj->sgt = sgt;