diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2021-08-18 08:59:28 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2021-08-29 06:26:12 +0200 |
commit | e7296d16ef7be11a6001be9bd89906ef55ab2405 (patch) | |
tree | 1cc11298c6f487c0254acf3fbd50668e67604c03 /drivers/clk | |
parent | clk: zynqmp: Check the return type (diff) | |
download | linux-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.c | 2 |
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); } |