aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/sh_mobile_hdmi.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c
index 45417fa9749b..5e2845b9f3a8 100644
--- a/drivers/video/sh_mobile_hdmi.c
+++ b/drivers/video/sh_mobile_hdmi.c
@@ -1290,7 +1290,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
1290 } 1290 }
1291 } 1291 }
1292 1292
1293 hdmi = kzalloc(sizeof(*hdmi), GFP_KERNEL); 1293 hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
1294 if (!hdmi) { 1294 if (!hdmi) {
1295 dev_err(&pdev->dev, "Cannot allocate device data\n"); 1295 dev_err(&pdev->dev, "Cannot allocate device data\n");
1296 return -ENOMEM; 1296 return -ENOMEM;
@@ -1304,7 +1304,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
1304 if (IS_ERR(hdmi->hdmi_clk)) { 1304 if (IS_ERR(hdmi->hdmi_clk)) {
1305 ret = PTR_ERR(hdmi->hdmi_clk); 1305 ret = PTR_ERR(hdmi->hdmi_clk);
1306 dev_err(&pdev->dev, "Unable to get clock: %d\n", ret); 1306 dev_err(&pdev->dev, "Unable to get clock: %d\n", ret);
1307 goto egetclk; 1307 return ret;
1308 } 1308 }
1309 1309
1310 /* select register access functions */ 1310 /* select register access functions */
@@ -1407,8 +1407,6 @@ ereqreg:
1407 clk_disable(hdmi->hdmi_clk); 1407 clk_disable(hdmi->hdmi_clk);
1408erate: 1408erate:
1409 clk_put(hdmi->hdmi_clk); 1409 clk_put(hdmi->hdmi_clk);
1410egetclk:
1411 kfree(hdmi);
1412 1410
1413 return ret; 1411 return ret;
1414} 1412}
@@ -1433,7 +1431,6 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev)
1433 iounmap(hdmi->htop1); 1431 iounmap(hdmi->htop1);
1434 iounmap(hdmi->base); 1432 iounmap(hdmi->base);
1435 release_mem_region(res->start, resource_size(res)); 1433 release_mem_region(res->start, resource_size(res));
1436 kfree(hdmi);
1437 1434
1438 return 0; 1435 return 0;
1439} 1436}