|
@@ -189,8 +189,9 @@ static int mddi_nt35399_probe(struct platform_device *pdev)
|
|
|
|
|
|
int ret;
|
|
|
|
|
|
- struct panel_info *panel = kzalloc(sizeof(struct panel_info),
|
|
|
- GFP_KERNEL);
|
|
|
+ struct panel_info *panel = devm_kzalloc(&pdev->dev,
|
|
|
+ sizeof(struct panel_info),
|
|
|
+ GFP_KERNEL);
|
|
|
|
|
|
printk(KERN_DEBUG "%s: enter.\n", __func__);
|
|
|
|
|
@@ -233,7 +234,6 @@ static int mddi_nt35399_remove(struct platform_device *pdev)
|
|
|
struct panel_info *panel = platform_get_drvdata(pdev);
|
|
|
|
|
|
setup_vsync(panel, 0);
|
|
|
- kfree(panel);
|
|
|
return 0;
|
|
|
}
|
|
|
|