Commit e7296d16 authored by Shubhrajyoti Datta's avatar Shubhrajyoti Datta Committed by Stephen Boyd

clk: zynqmp: Fix a memory leak

Fix a memory leak of mux.
Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/20210818065929.12835-3-shubhrajyoti.datta@xilinx.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 47d0fbd1
...@@ -159,7 +159,7 @@ struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id, ...@@ -159,7 +159,7 @@ struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id,
hw = &mux->hw; hw = &mux->hw;
ret = clk_hw_register(NULL, hw); ret = clk_hw_register(NULL, hw);
if (ret) { if (ret) {
kfree(hw); kfree(mux);
hw = ERR_PTR(ret); hw = ERR_PTR(ret);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment