提交 283a1c1f 编写于 作者: A Aaro Koskinen 提交者: Tony Lindgren

OMAP3+: smartreflex: delete debugfs entries on probe error

Delete created debugfs entries if probe fails.
Signed-off-by: NAaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: NKevin Hilman <khilman@ti.com>
上级 833d78fc
...@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) ...@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "%s: Unable to create debugfs directory" dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
"for n-values\n", __func__); "for n-values\n", __func__);
ret = PTR_ERR(nvalue_dir); ret = PTR_ERR(nvalue_dir);
goto err_iounmap; goto err_debugfs;
} }
omap_voltage_get_volttable(sr_info->voltdm, &volt_data); omap_voltage_get_volttable(sr_info->voltdm, &volt_data);
...@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) ...@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
"entries for n-values\n", "entries for n-values\n",
__func__, sr_info->voltdm->name); __func__, sr_info->voltdm->name);
ret = -ENODATA; ret = -ENODATA;
goto err_iounmap; goto err_debugfs;
} }
for (i = 0; i < sr_info->nvalue_count; i++) { for (i = 0; i < sr_info->nvalue_count; i++) {
...@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) ...@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
return ret; return ret;
err_debugfs:
debugfs_remove_recursive(sr_info->dbg_dir);
err_iounmap: err_iounmap:
list_del(&sr_info->node); list_del(&sr_info->node);
iounmap(sr_info->base); iounmap(sr_info->base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册