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 3/5] drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file
Date: Wed, 08 Aug 2012 10:08:53 +0900 [thread overview]
Message-ID: <002501cd7502$60b76af0$222640d0$%dae@samsung.com> (raw)
In-Reply-To: <1344235580-3030-4-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 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@linaro.org>
> ---
> 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.
next prev parent 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 [this message]
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
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='002501cd7502$60b76af0$222640d0$%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