From: Dima Zavin Date: Thu, 20 Oct 2011 21:48:37 +0000 (-0700) Subject: ARM: common: fiq_debugger: fix the cleanup on errors in probe X-Git-Tag: firefly_0821_release~7613^2~255 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0d5d8ecf7556f054b249a358ee9ede2ec8070b15;p=firefly-linux-kernel-4.4.55.git ARM: common: fiq_debugger: fix the cleanup on errors in probe Change-Id: I58bd0604c0520b13e11bf02836eb4ddbadba1372 Signed-off-by: Dima Zavin --- diff --git a/arch/arm/common/fiq_debugger.c b/arch/arm/common/fiq_debugger.c index d44690dae546..46bf7af88ff9 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; }