drm: gem_cma: Use ERR_CAST helper
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 3 Jul 2014 12:03:33 +0000 (17:33 +0530)
committerDave Airlie <airlied@redhat.com>
Mon, 21 Jul 2014 04:36:45 +0000 (14:36 +1000)
Makes the code a bit more readable.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_gem_cma_helper.c

index 05c97c5350a1b3fde396ed7a0a17d0af7d85e755..e467e67af6e7111c69b96cb792380b5727500650 100644 (file)
@@ -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;