OMAP3+: smartreflex: delete debugfs entries on probe error
authorAaro Koskinen <aaro.koskinen@nokia.com>
Tue, 26 Apr 2011 09:25:32 +0000 (02:25 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 3 May 2011 09:38:03 +0000 (02:38 -0700)
Delete created debugfs entries if probe fails.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/smartreflex.c

index f0a488ab32538237dd0f78a7c61e6ce20e0664de..fb7dc52394a8fd8a872fb0e1f22d0cc867a3df9b 100644 (file)
@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
                        "for n-values\n", __func__);
                ret = PTR_ERR(nvalue_dir);
-               goto err_iounmap;
+               goto err_debugfs;
        }
 
        omap_voltage_get_volttable(sr_info->voltdm, &volt_data);
@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
                        "entries for n-values\n",
                        __func__, sr_info->voltdm->name);
                ret = -ENODATA;
-               goto err_iounmap;
+               goto err_debugfs;
        }
 
        for (i = 0; i < sr_info->nvalue_count; i++) {
@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
 
        return ret;
 
+err_debugfs:
+       debugfs_remove_recursive(sr_info->dbg_dir);
 err_iounmap:
        list_del(&sr_info->node);
        iounmap(sr_info->base);
This page took 0.025433 seconds and 5 git commands to generate.