]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: onenand: samsung: add missing iounmap
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 12 Jan 2012 09:55:05 +0000 (10:55 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:11:20 +0000 (00:11 +0100)
commit8a6a547c3b408078eb946370ea65676a4496e4ec
treeb615202514e79c0a4d0c4bdce1d894bc31b06caa
parent932b0e074df5f04976f53a8c477f8dc0fbe9026d
mtd: onenand: samsung: add missing iounmap

Add missing iounmap in error handling code, in a case where the function
already preforms iounmap on some other execution path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
statement S,S1;
int ret;
@@
e = \(ioremap\|ioremap_nocache\)(...)
... when != iounmap(e)
if (<+...e...+>) S
... when any
    when != iounmap(e)
*if (...)
   { ... when != iounmap(e)
     return ...; }
... when any
iounmap(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/onenand/samsung.c