]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/dma/pl330.c: add missing iounmap
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 12 Jan 2012 09:55:06 +0000 (10:55 +0100)
committerVinod Koul <vinod.koul@linux.intel.com>
Tue, 31 Jan 2012 03:24:02 +0000 (08:54 +0530)
commit0379a1535067e5a50912d0f2eeabdf4684e2a626
tree6fe78c7efc79dc4265d01bc9d57a06ad7674ffff
parent9d42fd91b800124baa7e87271cac8eb3c80e8edb
drivers/dma/pl330.c: add missing iounmap

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

This patch additionally adds calls to clk_disable and clk_put.

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: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/pl330.c