summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/lantiq_wdt.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-12-26 18:38:00 +0100
committerWim Van Sebroeck <wim@iguana.be>2012-01-06 15:27:30 +0100
commit60daac4a9084d5a6216443f428d0060c42eb44ff (patch)
treec36fe26d452c044e458ff35cf5118ea67e5f84b2 /drivers/watchdog/lantiq_wdt.c
parent02861cca4b4f1ceaa7dc805041d84caee580670b (diff)
downloadblackbird-op-linux-60daac4a9084d5a6216443f428d0060c42eb44ff.tar.gz
blackbird-op-linux-60daac4a9084d5a6216443f428d0060c42eb44ff.zip
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/lantiq_wdt.c')
-rw-r--r--drivers/watchdog/lantiq_wdt.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c
index 102aed0efbf1..d3a63be2e28d 100644
--- a/drivers/watchdog/lantiq_wdt.c
+++ b/drivers/watchdog/lantiq_wdt.c
@@ -222,9 +222,6 @@ ltq_wdt_remove(struct platform_device *pdev)
{
misc_deregister(&ltq_wdt_miscdev);
- if (ltq_wdt_membase)
- iounmap(ltq_wdt_membase);
-
return 0;
}
OpenPOWER on IntegriCloud