Commit 59848db5055765a5d012ad7c428124eca1fcc625
Committed by
Inki Dae
1 parent
16e197417d
Exists in
master
and in
20 other branches
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>
Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff
drivers/gpu/drm/exynos/exynos_drm_vidi.c
... | ... | @@ -633,7 +633,7 @@ |
633 | 633 | |
634 | 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 | 637 | if (!ctx) |
638 | 638 | return -ENOMEM; |
639 | 639 | |
... | ... | @@ -672,8 +672,6 @@ |
672 | 672 | kfree(ctx->raw_edid); |
673 | 673 | ctx->raw_edid = NULL; |
674 | 674 | } |
675 | - | |
676 | - kfree(ctx); | |
677 | 675 | |
678 | 676 | return 0; |
679 | 677 | } |