Thread (1 message) 1 message, 1 author, 2011-07-05

[PATCH 3/5] arch/arm/mach-omap2/smartreflex.c: add missing error-handling code

From: Kevin Hilman <hidden>
Date: 2011-07-05 17:51:20
Also in: kernel-janitors, linux-omap, lkml

Julia Lawall [off-list ref] writes:
From: Julia Lawall <redacted>

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 <redacted>
Acked-by: Kevin Hilman <redacted>

Tony, can you add this to devel-fixes?

Kevin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help