Skip to content

Commit

Permalink
clk: zynqmp: Fix a memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shubhrajyoti Datta authored and bebarino committed Aug 29, 2021
1 parent 47d0fbd commit e7296d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/zynqmp/clk-mux-zynqmp.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit e7296d1

Please sign in to comment.