aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/smartreflex.c
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2011-04-26 05:25:32 -0400
committerTony Lindgren <tony@atomide.com>2011-05-03 05:38:03 -0400
commit283a1c1f276d879ab8bafec8ec9f8fca03f159bb (patch)
treeb508141ab225809642542b8c68cf93e02cc1e1a8 /arch/arm/mach-omap2/smartreflex.c
parent833d78fc58774738a6fe7175794b9a9b251afa88 (diff)
OMAP3+: smartreflex: delete debugfs entries on probe error
Delete created debugfs entries if probe fails. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/smartreflex.c')
-rw-r--r--arch/arm/mach-omap2/smartreflex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index f0a488ab3253..fb7dc52394a8 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
929 dev_err(&pdev->dev, "%s: Unable to create debugfs directory" 929 dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
930 "for n-values\n", __func__); 930 "for n-values\n", __func__);
931 ret = PTR_ERR(nvalue_dir); 931 ret = PTR_ERR(nvalue_dir);
932 goto err_iounmap; 932 goto err_debugfs;
933 } 933 }
934 934
935 omap_voltage_get_volttable(sr_info->voltdm, &volt_data); 935 omap_voltage_get_volttable(sr_info->voltdm, &volt_data);
@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
939 "entries for n-values\n", 939 "entries for n-values\n",
940 __func__, sr_info->voltdm->name); 940 __func__, sr_info->voltdm->name);
941 ret = -ENODATA; 941 ret = -ENODATA;
942 goto err_iounmap; 942 goto err_debugfs;
943 } 943 }
944 944
945 for (i = 0; i < sr_info->nvalue_count; i++) { 945 for (i = 0; i < sr_info->nvalue_count; i++) {
@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
953 953
954 return ret; 954 return ret;
955 955
956err_debugfs:
957 debugfs_remove_recursive(sr_info->dbg_dir);
956err_iounmap: 958err_iounmap:
957 list_del(&sr_info->node); 959 list_del(&sr_info->node);
958 iounmap(sr_info->base); 960 iounmap(sr_info->base);