[PATCH] clocksource: timer-sp804: Unmap region obtained by of_iomap.

From: Arvind Yadav
Date: Wed Jun 28 2017 - 06:10:18 EST


In case of error at init time, rollback iomapping.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
---
drivers/clocksource/timer-sp804.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index 2d575a8c..5830bc9 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -306,7 +306,8 @@ static int __init integrator_cp_of_init(struct device_node *np)
clk = of_clk_get(np, 0);
if (IS_ERR(clk)) {
pr_err("Failed to get clock\n");
- return PTR_ERR(clk);
+ ret = PTR_ERR(clk);
+ goto err;
}

/* Ensure timer is disabled */
--
1.9.1