Free memory mapping, if integrator_cp_of_init is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
 drivers/clocksource/timer-sp804.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clocksource/timer-sp804.c 
b/drivers/clocksource/timer-sp804.c
index d078633..419995d 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -306,6 +306,7 @@ 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");
+               iounmap(base);
                return PTR_ERR(clk);
        }
 
-- 
2.7.4

Reply via email to