diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-08-04 10:35:30 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-08-22 09:17:34 +0530 |
commit | 94d3901c11ab4115740ec3891d07f086f18c8cd6 (patch) | |
tree | 239a876a1d6dece00586a978a2abb3632d5fcd01 /drivers/dma/ste_dma40.c | |
parent | c87a9fcd1ed6cd4ad27a0c65db6a470c8dd56190 (diff) |
drivers/dma/sirf-dma.c: fix usage of devm functions
Fix some problems with the use of devm_ functions.
devm_kzalloc: devm_kfree is not needed
devm_ioremap: iounmap should not be used, no free is needed
devm_request_irq: the devm_free_irq is followed by irq_dispose_mapping. I
don't know if it is safe to move the freeing of the irq in this case, so I
have just un-devm'd this function, since the implicit freeing is never
taken advantage of.
In the original code failure of of_address_to_resource jumped to free_mem,
but should have jumped to irq_dispose, since irq_of_parse_and_map has
completed at this point.
In the original code unmap_mem was after irq_dispose, but it should have
been before, again since irq_of_parse_and_map has completed at this point.
One of these problems was found using the following semantic match:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x;
@@
*x = devm_ioremap(...)
...
iounmap(x);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
0 files changed, 0 insertions, 0 deletions