提交 59848db5 编写于 作者: S Sachin Kamat 提交者: Inki Dae

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: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NInki Dae <inki.dae@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
上级 16e19741
...@@ -633,7 +633,7 @@ static int __devinit vidi_probe(struct platform_device *pdev) ...@@ -633,7 +633,7 @@ static int __devinit vidi_probe(struct platform_device *pdev)
DRM_DEBUG_KMS("%s\n", __FILE__); DRM_DEBUG_KMS("%s\n", __FILE__);
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) if (!ctx)
return -ENOMEM; return -ENOMEM;
...@@ -673,8 +673,6 @@ static int __devexit vidi_remove(struct platform_device *pdev) ...@@ -673,8 +673,6 @@ static int __devexit vidi_remove(struct platform_device *pdev)
ctx->raw_edid = NULL; ctx->raw_edid = NULL;
} }
kfree(ctx);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册