dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Sachin Kamat 2012-08-06 12:16:18 +05:30 committed by Inki Dae
parent 16e197417d
commit 59848db505
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}