diff options
author | Julia Lawall <julia@diku.dk> | 2011-11-13 05:51:53 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-11-19 08:55:02 +0800 |
commit | 653eb1f5679953e303f9e7ccf6ffba5d4a1c18d7 (patch) | |
tree | 125c1af0be3c21e1ac05407292a7ba7909d42c8c /arch/arm | |
parent | b94ca8e5df28059f61e0c13a00b3c16b6b472c10 (diff) |
arch/arm/mach-omap2/smartreflex.c: add missing error-handling code
At this point, the ioremap has taken place, so the error handling code at
the label err_iounmap should be used rather than returning directly.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier x;
@@
kfree(x)
@@
identifier r.x;
expression E1!=0,E2,E3,E4;
statement S;
@@
(
if (<+...x...+>) S
|
if (...) { ... when != kfree(x)
when != if (...) { ... kfree(x); ... }
when != x = E3
* return E1;
}
... when != x = E2
if (...) { ... when != x = E4
kfree(x); ... return ...; }
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/smartreflex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index bb606c9709b..36f7971042c 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -896,7 +896,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__); - return ret; + goto err_iounmap; } } |