diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-08-06 08:46:19 +0200 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-09-13 05:38:08 +0200 |
commit | ae18294018c7cf098777a33086073321477f723f (patch) | |
tree | b39cfbd25e0736e05375f8bf4a9ba775fe58b216 /drivers/gpu | |
parent | drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file (diff) | |
download | linux-ae18294018c7cf098777a33086073321477f723f.tar.xz linux-ae18294018c7cf098777a33086073321477f723f.zip |
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>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | 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 8ffcdf8b9e22..3fdf0b65f47e 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; } |