From patchwork Thu May 29 04:33:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 4265841 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 93D77BEEAA for ; Thu, 29 May 2014 15:22:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB28220353 for ; Thu, 29 May 2014 15:22:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E9A6D2034C for ; Thu, 29 May 2014 15:22:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75B636E9C9; Thu, 29 May 2014 08:22:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 04ED96E01F for ; Wed, 28 May 2014 21:35:41 -0700 (PDT) Received: by mail-pa0-f49.google.com with SMTP id kp14so2301280pab.8 for ; Wed, 28 May 2014 21:35:40 -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; bh=MmA2SGWaEcMOCXJTKoCOLGtPLkx0lNYfOFy3CyXyauU=; b=G15OVk6W7DHyh0QJYIBbM2uvZvwSHSurqIMBLpwSpUX1+KZqayoiPe5qhPbzW2ZFyD MQby7HGpXBWM/GnQQ0i7hKCuKR8w+/WWF47LPSlnjvnrQ11Nl8zyS93q3+qBmtqLcGKp 5q61VKCWRJ4lVUF1CR4Bo2no/waId0/610H+0+mvxrp1Cxaizc566QFGgkJXmsoADnwO 2Xisnr4UtEgQdpyVVdWwMtWZBNRmp8F/43A2o+3w4mzV6nDCeZ3HOtZcY8ecBhngd3ei ZwSR1Z92F2splTaPJyssaL7B765tMMizuDLI/UllGbKjIan8r+Xzr2bm6HxZLu5zxfZF YYrg== X-Gm-Message-State: ALoCoQnAb4I+omyQjQq95kINSBYKkobKAk0PbU4hdNeDIB/l1yzhRMq0A7qAO4IMXZWFdRnWr6FA X-Received: by 10.66.66.12 with SMTP id b12mr3455566pat.72.1401338140704; Wed, 28 May 2014 21:35:40 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id or4sm31061604pbb.17.2014.05.28.21.35.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 21:35:39 -0700 (PDT) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/1] drm: gem_cma: Use ERR_CAST helper Date: Thu, 29 May 2014 10:03:18 +0530 Message-Id: <1401337998-18085-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Mailman-Approved-At: Thu, 29 May 2014 08:22:46 -0700 Cc: sachin.kamat@linaro.org, Laurent Pinchart 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Makes the code a bit more readable. Signed-off-by: Sachin Kamat Cc: 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;