diff mbox

[Resend,1/1] drm: gem_cma: Use ERR_CAST helper

Message ID 1404389013-9721-1-git-send-email-sachin.kamat@samsung.com
State Accepted
Commit e7c36347130fc3b9eec3572d00c53533f07a7347
Headers show

Commit Message

Sachin Kamat July 3, 2014, 12:03 p.m. UTC
From: Sachin Kamat <sachin.kamat@linaro.org>

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>
---
 drivers/gpu/drm/drm_gem_cma_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sachin Kamat July 18, 2014, 12:08 p.m. UTC | #1
On Thu, Jul 3, 2014 at 5:33 PM, Sachin Kamat <sachin.kamat@samsung.com> wrote:
> From: Sachin Kamat <sachin.kamat@linaro.org>
>
> 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>
> ---
>  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;
> --
> 1.7.9.5
>

Gentle ping..
diff mbox

Patch

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;