RE: [PATCH 3/5] drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Sachin Kamat [mailto:sachin.kamat@xxxxxxxxxx]
> Sent: Monday, August 06, 2012 3:46 PM
> To: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: inki.dae@xxxxxxxxxxx; airlied@xxxxxxxx; sachin.kamat@xxxxxxxxxx;
> patches@xxxxxxxxxx
> Subject: [PATCH 3/5] drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c
> file
> 
> devm_kzalloc is a device managed function and makes freeing and error
> handling simpler.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> index bb1550c..537027a 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> @@ -633,7 +633,7 @@ static int __devinit vidi_probe(struct platform_device
> *pdev)
> 
>  	DRM_DEBUG_KMS("%s\n", __FILE__);
> 
> -	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
> +	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
>  	if (!ctx)
>  		return -ENOMEM;
> 
> @@ -673,8 +673,6 @@ static int __devexit vidi_remove(struct
> platform_device *pdev)
>  		ctx->raw_edid = NULL;
>  	}
> 
> -	kfree(ctx);
> -
>  	return 0;
>  }
> 
> --
> 1.7.4.1

Applied.

Thanks for your patch.

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux