arm: mach-omap2: omap_l3_smx: fix request_irq() error path
Subsystems (3)
PATCH 1/6 arm: mach-omap2: omap_l3_smx: fix request_irq() error path
The debug irq should be freed on the error path.
--- arch/arm/mach-omap2/omap_l3_smx.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_l3_smx.c +1 -0
@@ -273,6 +273,7 @@ static int __init omap3_l3_probe(struct platform_device *pdev) goto err0; err4: +free_irq (l3->debug_irq, l3); err3:iounmap (l3->rt); err2:
Signature · 1 line
1.5.6.5
PATCH 2/6 arm: mach-omap2: smartreflex: fix sr_late_init() error path in probe
sr_late_init() will take care of freeing the resources.
--- arch/arm/mach-omap2/smartreflex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/smartreflex.c +1 -1
@@ -883,7 +883,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) ret =sr_late_init (sr_info);if (ret) {pr_warning ("%s: Error in SR late init\n" , __func__); - goto err_release_region; +return ret; } }
Signature · 1 line
1.5.6.5
PATCH 2/6 arm: mach-omap2: smartreflex: fix sr_late_init() error path in probe
Quoted 3 lines · Aaro Koskinen
sr_late_init()will take care of freeing the resources.Signed-off-by Aaro Koskinen <[email protected]>
Thanks,
As I've already got some other SR related stuff queued up for 2.6.39, I'll queue patches 2-6 for the 2.6.39-rc fixes cycle.
Tony can take patch 1 as he see's fit.
Also, I renamed the subject/shortlog to use 'OMAP2+: smartreflex: ..." instead of 'arm: mach-omap2'.
Kevin
Quoted 16 lines
--- arch/arm/mach-omap2/smartreflex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-omap2/smartreflex.c +1
-1@@ -883,7 +883,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) ret =sr_late_init (sr_info);if (ret) {pr_warning ("%s: Error in SR late init\n" , __func__); - goto err_release_region; +return ret; } }
PATCH 2/6 arm: mach-omap2: smartreflex: fix sr_late_init() error path in probe
Kevin Hilman wrote, on 03/24/2011 10:48 PM:
Quoted 2 lines
Also, I renamed the subject/shortlog to use 'OMAP2+: smartreflex: ..." instead of 'arm: mach-omap2'.
might be better to be OMAP3+ we dont have SR on OMAP2 :)
Signature · 2 lines
Regards, Nishanth Menon
PATCH 2/6 arm: mach-omap2: smartreflex: fix sr_late_init() error path in probe
Quoted 6 lines · Nishanth Menon
Kevin Hilman wrote, on 03/24/2011 10:48 PM:
Quoted 2 lines
Also, I renamed the subject/shortlog to use 'OMAP2+: smartreflex: ..." instead of 'arm: mach-omap2'.
might be better to be OMAP3+ we dont have SR on OMAP2 :)
Good point. Will use OMAP3+.
Thanks,
Kevin
P.S. Nishanth, as you are one of the primary developers on SR, any
acks, reviewed-bys from you are most welcome on SR patches. Thanks.
PATCH 3/6 arm: mach-omap2: smartreflex: request the memory region
In reply to Aaro KoskinenWe are releasing the memory region, but never actually request it.
--- arch/arm/mach-omap2/smartreflex.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/smartreflex.c +8 -0
@@ -847,6 +847,14 @@ static int __init omap_sr_probe(struct platform_device *pdev) goto err_free_devinfo; } + mem =request_mem_region (mem->start,resource_size (mem), +dev_name (&pdev->dev)); +if (!mem) { +dev_err (&pdev->dev,"%s: no mem region\n" , __func__); + ret = -EBUSY ; + goto err_free_devinfo; + } + irq =platform_get_resource (pdev,IORESOURCE_IRQ ,0 );pm_runtime_enable (&pdev->dev);
Signature · 1 line
1.5.6.5
PATCH 4/6 arm: mach-omap2: smartreflex: fix ioremap leak on probe error
In reply to Aaro KoskinenAdd missing iounmap() to error paths.
--- arch/arm/mach-omap2/smartreflex.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/smartreflex.c +6 -4
@@ -904,7 +904,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) vdd_dbg_dir =omap_voltage_get_dbgdir (sr_info->voltdm);if (!vdd_dbg_dir) { ret = -EINVAL ; - goto err_release_region; + goto err_iounmap; } sr_info->dbg_dir =debugfs_create_dir ("smartreflex" , vdd_dbg_dir);
@@ -912,7 +912,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_release_region; + goto err_iounmap; } (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR,
@@ -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_release_region; + goto err_iounmap; }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_release_region; + goto err_iounmap; }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_iounmap: +iounmap (sr_info->base); err_release_region:release_mem_region (mem->start,resource_size (mem)); err_free_devinfo:
Signature · 1 line
1.5.6.5
PATCH 5/6 arm: mach-omap2: smartreflex: delete instance from sr_list on probe error
In reply to Aaro KoskinenIf the probe fails, the node should be deleted from sr_list.
--- arch/arm/mach-omap2/smartreflex.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/smartreflex.c +1 -0
@@ -954,6 +954,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)return ret; err_iounmap: +list_del (&sr_info->node);iounmap (sr_info->base); err_release_region:release_mem_region (mem->start,resource_size (mem));
Signature · 1 line
1.5.6.5
PATCH 6/6 arm: mach-omap2: smartreflex: delete debugfs entries on probe error
In reply to Aaro KoskinenDelete created debugfs entries if probe fails.
--- arch/arm/mach-omap2/smartreflex.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/smartreflex.c +4 -2
@@ -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);
Signature · 1 line
1.5.6.5