fa9fc821f8
The function of_iomap returns the result of calling ioremap, so iounmap should be called on the result in the error handling code, as done in the normal exit of the function. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression x; expression E,E1; identifier l; statement S; @@ *x = of_iomap(...); ... when != iounmap(x) when != if (...) { ... iounmap(x); ... } when != E = x when any ( if (x == NULL) S | if (...) { ... when != iounmap(x) when != if (...) { ... iounmap(x); ... } ( return <+...x...+>; | * return ...; ) } ) ... when != x = E1 when any iounmap(x); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
||
---|---|---|
.. | ||
asp834x.c | ||
Kconfig | ||
kmeter1.c | ||
Makefile | ||
mcu_mpc8349emitx.c | ||
misc.c | ||
mpc83xx.h | ||
mpc830x_rdb.c | ||
mpc831x_rdb.c | ||
mpc832x_mds.c | ||
mpc832x_rdb.c | ||
mpc834x_itx.c | ||
mpc834x_mds.c | ||
mpc836x_mds.c | ||
mpc836x_rdk.c | ||
mpc837x_mds.c | ||
mpc837x_rdb.c | ||
sbc834x.c | ||
suspend-asm.S | ||
suspend.c | ||
usb.c |