Re: [PATCH 1/2] ARM: OMAP: SmartReflex: fix error path in init function

2012-10-02 Thread Kevin Hilman
Jean Pihet jean.pi...@newoldbits.com writes:

 Fix the error handling path in omap_sr_probe to correctly
 de-allocate resources in case of problems.

 Signed-off-by: Jean Pihet j-pi...@ti.com

Thanks, queuing this one as a fix for v3.7-rc

Kevin
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ARM: OMAP: SmartReflex: fix error path in init function

2012-09-24 Thread Jean Pihet
Fix the error handling path in omap_sr_probe to correctly
de-allocate resources in case of problems.

Signed-off-by: Jean Pihet j-pi...@ti.com
---
 drivers/power/avs/smartreflex.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index 44efc6e..92f6728 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -928,7 +928,7 @@ static int __init omap_sr_probe(struct platform_device 
*pdev)
if (!sr_info-base) {
dev_err(pdev-dev, %s: ioremap fail\n, __func__);
ret = -ENOMEM;
-   goto err_release_region;
+   goto err_free_name;
}
 
if (irq)
@@ -967,7 +967,7 @@ static int __init omap_sr_probe(struct platform_device 
*pdev)
dev_err(pdev-dev, %s: Unable to create debugfs directory\n,
__func__);
ret = PTR_ERR(sr_info-dbg_dir);
-   goto err_free_name;
+   goto err_debugfs;
}
 
(void) debugfs_create_file(autocomp, S_IRUGO | S_IWUSR,
@@ -1011,11 +1011,11 @@ static int __init omap_sr_probe(struct platform_device 
*pdev)
 
 err_debugfs:
debugfs_remove_recursive(sr_info-dbg_dir);
-err_free_name:
-   kfree(sr_info-name);
 err_iounmap:
list_del(sr_info-node);
iounmap(sr_info-base);
+err_free_name:
+   kfree(sr_info-name);
 err_release_region:
release_mem_region(mem-start, resource_size(mem));
 err_free_devinfo:
-- 
1.7.7.6

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ARM: OMAP: SmartReflex: fix error path in init function

2012-09-20 Thread Jean Pihet
Fix the error handling path in omap_sr_probe to correctly
de-allocate resources in case of problems.

Signed-off-by: Jean Pihet j-pi...@ti.com
---
 drivers/power/avs/smartreflex.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index 44efc6e..92f6728 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -928,7 +928,7 @@ static int __init omap_sr_probe(struct platform_device 
*pdev)
if (!sr_info-base) {
dev_err(pdev-dev, %s: ioremap fail\n, __func__);
ret = -ENOMEM;
-   goto err_release_region;
+   goto err_free_name;
}
 
if (irq)
@@ -967,7 +967,7 @@ static int __init omap_sr_probe(struct platform_device 
*pdev)
dev_err(pdev-dev, %s: Unable to create debugfs directory\n,
__func__);
ret = PTR_ERR(sr_info-dbg_dir);
-   goto err_free_name;
+   goto err_debugfs;
}
 
(void) debugfs_create_file(autocomp, S_IRUGO | S_IWUSR,
@@ -1011,11 +1011,11 @@ static int __init omap_sr_probe(struct platform_device 
*pdev)
 
 err_debugfs:
debugfs_remove_recursive(sr_info-dbg_dir);
-err_free_name:
-   kfree(sr_info-name);
 err_iounmap:
list_del(sr_info-node);
iounmap(sr_info-base);
+err_free_name:
+   kfree(sr_info-name);
 err_release_region:
release_mem_region(mem-start, resource_size(mem));
 err_free_devinfo:
-- 
1.7.7.6

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html