From: aaro.koskinen@nokia.com (Aaro Koskinen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] arm: mach-omap2: smartreflex: fix ioremap leak on probe error
Date: Thu, 24 Mar 2011 18:35:33 +0200 [thread overview]
Message-ID: <1300984535-10530-4-git-send-email-aaro.koskinen@nokia.com> (raw)
In-Reply-To: <1300984535-10530-1-git-send-email-aaro.koskinen@nokia.com>
Add missing iounmap() to error paths.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
arch/arm/mach-omap2/smartreflex.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 81bd5ed..e72b419 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -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:
--
1.5.6.5
next prev parent reply other threads:[~2011-03-24 16:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 16:35 [PATCH 1/6] arm: mach-omap2: omap_l3_smx: fix request_irq() error path Aaro Koskinen
2011-03-24 16:35 ` [PATCH 2/6] arm: mach-omap2: smartreflex: fix sr_late_init() error path in probe Aaro Koskinen
2011-03-24 17:18 ` Kevin Hilman
2011-03-25 3:50 ` Nishanth Menon
2011-03-25 14:51 ` Kevin Hilman
2011-03-24 16:35 ` [PATCH 3/6] arm: mach-omap2: smartreflex: request the memory region Aaro Koskinen
2011-03-24 16:35 ` Aaro Koskinen [this message]
2011-03-24 16:35 ` [PATCH 5/6] arm: mach-omap2: smartreflex: delete instance from sr_list on probe error Aaro Koskinen
2011-03-24 16:35 ` [PATCH 6/6] arm: mach-omap2: smartreflex: delete debugfs entries " Aaro Koskinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300984535-10530-4-git-send-email-aaro.koskinen@nokia.com \
--to=aaro.koskinen@nokia.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).