aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-08-06 02:46:18 -0400
committerInki Dae <inki.dae@samsung.com>2012-09-12 23:38:07 -0400
commit59848db5055765a5d012ad7c428124eca1fcc625 (patch)
tree4fed6a3467071bdc0a79e0b507d1e7858ee038dd /drivers/gpu/drm
parent16e197417de3414af7c183f7f4abfa2c7e37f297 (diff)
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> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.c4
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 bb1550c4dd57..537027a74fd5 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)
633 633
634 DRM_DEBUG_KMS("%s\n", __FILE__); 634 DRM_DEBUG_KMS("%s\n", __FILE__);
635 635
636 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); 636 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
637 if (!ctx) 637 if (!ctx)
638 return -ENOMEM; 638 return -ENOMEM;
639 639
@@ -673,8 +673,6 @@ static int __devexit vidi_remove(struct platform_device *pdev)
673 ctx->raw_edid = NULL; 673 ctx->raw_edid = NULL;
674 } 674 }
675 675
676 kfree(ctx);
677
678 return 0; 676 return 0;
679} 677}
680 678