dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: 'Sachin Kamat' <sachin.kamat@linaro.org>,
	dri-devel@lists.freedesktop.org
Cc: patches@linaro.org
Subject: RE: [PATCH 4/5] drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file
Date: Wed, 08 Aug 2012 10:09:33 +0900	[thread overview]
Message-ID: <002601cd7502$78748920$695d9b60$%dae@samsung.com> (raw)
In-Reply-To: <1344235580-3030-5-git-send-email-sachin.kamat@linaro.org>



> -----Original Message-----
> From: Sachin Kamat [mailto:sachin.kamat@linaro.org]
> Sent: Monday, August 06, 2012 3:46 PM
> To: dri-devel@lists.freedesktop.org
> Cc: inki.dae@samsung.com; airlied@linux.ie; sachin.kamat@linaro.org;
> patches@linaro.org
> Subject: [PATCH 4/5] drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c
> file
> 
> devm_kzalloc is a device managed function and makes freeing and error
> handling simpler.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_hdmi.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
> b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
> index 8ffcdf8..3fdf0b6 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
> @@ -345,7 +345,7 @@ static int __devinit exynos_drm_hdmi_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) {
>  		DRM_LOG_KMS("failed to alloc common hdmi context.\n");
>  		return -ENOMEM;
> @@ -371,7 +371,6 @@ static int __devexit exynos_drm_hdmi_remove(struct
> platform_device *pdev)
>  	DRM_DEBUG_KMS("%s\n", __FILE__);
> 
>  	exynos_drm_subdrv_unregister(&ctx->subdrv);
> -	kfree(ctx);
> 
>  	return 0;
>  }
> --
> 1.7.4.1

Applied.

Thanks for your patch.

  reply	other threads:[~2012-08-08  1:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06  6:46 [PATCH 0/5] drm/exynos: Use devm_* functions and cleanup Sachin Kamat
2012-08-06  6:46 ` [PATCH 1/5] drm/exynos: Remove redundant check in exynos_hdmi.c file Sachin Kamat
2012-08-08  1:05   ` Inki Dae
2012-08-06  6:46 ` [PATCH 2/5] drm/exynos: Remove redundant check in exynos_drm_fimd.c file Sachin Kamat
2012-08-08  1:07   ` Inki Dae
2012-08-06  6:46 ` [PATCH 3/5] drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file Sachin Kamat
2012-08-08  1:08   ` Inki Dae
2012-08-06  6:46 ` [PATCH 4/5] drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file Sachin Kamat
2012-08-08  1:09   ` Inki Dae [this message]
2012-08-06  6:46 ` [PATCH 5/5] drm/exynos: Use devm_* functions in exynos_drm_g2d.c file Sachin Kamat
2012-08-08  1:18   ` Inki Dae

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002601cd7502$78748920$695d9b60$%dae@samsung.com' \
    --to=inki.dae@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=patches@linaro.org \
    --cc=sachin.kamat@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox