summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2021-08-18 08:59:28 +0200
committerStephen Boyd <sboyd@kernel.org>2021-08-29 06:26:12 +0200
commite7296d16ef7be11a6001be9bd89906ef55ab2405 (patch)
tree1cc11298c6f487c0254acf3fbd50668e67604c03 /drivers/clk
parentclk: zynqmp: Check the return type (diff)
downloadlinux-e7296d16ef7be11a6001be9bd89906ef55ab2405.tar.xz
linux-e7296d16ef7be11a6001be9bd89906ef55ab2405.zip
clk: zynqmp: Fix a memory leak
Fix a memory leak of mux. Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Link: https://lore.kernel.org/r/20210818065929.12835-3-shubhrajyoti.datta@xilinx.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/zynqmp/clk-mux-zynqmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/zynqmp/clk-mux-zynqmp.c b/drivers/clk/zynqmp/clk-mux-zynqmp.c
index 157d4a960bf4..17afce594f28 100644
--- a/drivers/clk/zynqmp/clk-mux-zynqmp.c
+++ b/drivers/clk/zynqmp/clk-mux-zynqmp.c
@@ -159,7 +159,7 @@ struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id,
hw = &mux->hw;
ret = clk_hw_register(NULL, hw);
if (ret) {
- kfree(hw);
+ kfree(mux);
hw = ERR_PTR(ret);
}