[PATCH] clocksource: timer-ti-32k: Unmap region obtained by of_iomap.
From: Arvind Yadav
Date: Wed Jun 28 2017 - 01:54:39 EST
In case of error at init time, rollback iomapping.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
---
drivers/clocksource/timer-ti-32k.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clocksource/timer-ti-32k.c b/drivers/clocksource/timer-ti-32k.c
index 6240677..658d759 100644
--- a/drivers/clocksource/timer-ti-32k.c
+++ b/drivers/clocksource/timer-ti-32k.c
@@ -116,6 +116,7 @@ static int __init ti_32k_timer_init(struct device_node *np)
ret = clocksource_register_hz(&ti_32k_timer.cs, 32768);
if (ret) {
pr_err("32k_counter: can't register clocksource\n");
+ iounmap(ti_32k_timer.base);
return ret;
}
--
1.9.1