]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0036-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch
28ee84fc7dcb1cff1f573e9e822831c4ef942c0a
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-omap-2.6.39 / pm / linux-omap-2.6.39-ti-pm / 0036-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch
1 From 1108cddc9f227ba5ded64c1c8141ce9147a4902d Mon Sep 17 00:00:00 2001
2 From: Aaro Koskinen <aaro.koskinen@nokia.com>
3 Date: Thu, 24 Mar 2011 18:35:33 +0200
4 Subject: [PATCH 36/59] OMAP3+: smartreflex: fix ioremap leak on probe error
6 Add missing iounmap() to error paths.
8 Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
9 Signed-off-by: Kevin Hilman <khilman@ti.com>
10 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11 ---
12  arch/arm/mach-omap2/smartreflex.c |   10 ++++++----
13  1 files changed, 6 insertions(+), 4 deletions(-)
15 diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
16 index 703143a..156807e 100644
17 --- a/arch/arm/mach-omap2/smartreflex.c
18 +++ b/arch/arm/mach-omap2/smartreflex.c
19 @@ -904,7 +904,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
20         vdd_dbg_dir = omap_voltage_get_dbgdir(sr_info->voltdm);
21         if (!vdd_dbg_dir) {
22                 ret = -EINVAL;
23 -               goto err_release_region;
24 +               goto err_iounmap;
25         }
26  
27         sr_info->dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
28 @@ -912,7 +912,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
29                 dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n",
30                         __func__);
31                 ret = PTR_ERR(sr_info->dbg_dir);
32 -               goto err_release_region;
33 +               goto err_iounmap;
34         }
35  
36         (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR,
37 @@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
38                 dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
39                         "for n-values\n", __func__);
40                 ret = PTR_ERR(nvalue_dir);
41 -               goto err_release_region;
42 +               goto err_iounmap;
43         }
44  
45         omap_voltage_get_volttable(sr_info->voltdm, &volt_data);
46 @@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
47                         "entries for n-values\n",
48                         __func__, sr_info->voltdm->name);
49                 ret = -ENODATA;
50 -               goto err_release_region;
51 +               goto err_iounmap;
52         }
53  
54         for (i = 0; i < sr_info->nvalue_count; i++) {
55 @@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
56  
57         return ret;
58  
59 +err_iounmap:
60 +       iounmap(sr_info->base);
61  err_release_region:
62         release_mem_region(mem->start, resource_size(mem));
63  err_free_devinfo:
64 -- 
65 1.6.6.1