From 1bd7a4c41bb16310528f4bf091c1991d223b84c4 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Thu, 20 Oct 2011 14:48:37 -0700 Subject: [PATCH] ARM: common: fiq_debugger: fix the cleanup on errors in probe Change-Id: I58bd0604c0520b13e11bf02836eb4ddbadba1372 Signed-off-by: Dima Zavin --- arch/arm/common/fiq_debugger.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/common/fiq_debugger.c b/arch/arm/common/fiq_debugger.c index d44690d..46bf7af 100644 --- a/arch/arm/common/fiq_debugger.c +++ b/arch/arm/common/fiq_debugger.c @@ -923,9 +923,12 @@ err_register_fiq: if (pdata->uart_free) pdata->uart_free(pdev); err_uart_init: - kfree(state); + if (state->clk) + clk_disable(state->clk); if (state->clk) clk_put(state->clk); + wake_lock_destroy(&state->debugger_wake_lock); + kfree(state); return ret; } -- 2.7.4