clk: exynos-audss: Fix memory leak on driver unbind or probe failure
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 5 Jan 2015 09:52:41 +0000 (10:52 +0100)
committerMichael Turquette <mturquette@linaro.org>
Sat, 17 Jan 2015 21:52:41 +0000 (13:52 -0800)
commit27c76c43623fe835a2b652228363ed108373609d
tree6bac010e4a451d073e1d1d4070286fabede77cf2
parent4e3c021fb995bcbb5d1f814d00584cb80eb904a8
clk: exynos-audss: Fix memory leak on driver unbind or probe failure

The memory allocated by basic clock divider/gate/mux (struct clk_gate,
clk_divider and clk_mux) was leaking. During driver unbind or probe
failure the driver only unregistered the clocks.

Use clk_unregister_{gate,divider,mux} to release all resources.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
drivers/clk/samsung/clk-exynos-audss.c