From: Sachin Kamat Date: Thu, 3 Jul 2014 12:03:33 +0000 (+0530) Subject: drm: gem_cma: Use ERR_CAST helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7c36347130fc3b9eec3572d00c53533f07a7347;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm: gem_cma: Use ERR_CAST helper Makes the code a bit more readable. Signed-off-by: Sachin Kamat Signed-off-by: Sachin Kamat Acked-by: Laurent Pinchart Signed-off-by: Dave Airlie --- 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;