diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch new file mode 100644 index 00000000..ea1e5673 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From b3ca51ac09da7c260c28df396d4c830814697ff0 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 05/12] OMAP3+: smartreflex: fix ioremap leak on probe error | ||
5 | |||
6 | Add missing iounmap() to error paths. | ||
7 | |||
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(-) | ||
14 | |||
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 | ||
66 | |||