diff options
author | Julia Lawall <julia@diku.dk> | 2011-12-26 18:38:00 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-01-06 15:27:30 +0100 |
commit | 60daac4a9084d5a6216443f428d0060c42eb44ff (patch) | |
tree | c36fe26d452c044e458ff35cf5118ea67e5f84b2 /drivers/watchdog/omap_wdt.c | |
parent | 02861cca4b4f1ceaa7dc805041d84caee580670b (diff) |
drivers/watchdog/lantiq_wdt.c: drop iounmap for devm_ allocated data
Data allocated with devm_ioremap or devm_ioremap_nocache should not be
freed using iounmap, because doing so causes a dangling pointer, and a
subsequent double free.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
expression x;
@@
(
x = devm_ioremap(...)
|
x = devm_ioremap_nocache(...)
)
@@
expression r.x;
@@
* iounmap(x)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/omap_wdt.c')
0 files changed, 0 insertions, 0 deletions