2017-06-28 10:10:14

by Arvind Yadav

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

In case of error at init time, rollback iomapping.

Signed-off-by: Arvind Yadav <[email protected]>
---
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