Skip to content

Commit

Permalink
OMAP3+: smartreflex: delete debugfs entries on probe error
Browse files Browse the repository at this point in the history
Delete created debugfs entries if probe fails.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
  • Loading branch information
Aaro Koskinen authored and Tony Lindgren committed May 3, 2011
1 parent 833d78f commit 283a1c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/arm/mach-omap2/smartreflex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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++) {
Expand All @@ -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);
Expand Down

0 comments on commit 283a1c1

Please sign in to comment.