summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorAndrew Goodbody <[email protected]>2025-07-23 17:32:45 +0100
committerFabio Estevam <[email protected]>2025-08-07 08:13:17 -0300
commitb65ea8534fc9d59e9742e76820d03f6783db3cf5 (patch)
tree45046451df782240badc61e89e9d59ed94e2d477 /drivers/clk
parent3526f990b77fca1c933f1d8b24eb9385010a05bf (diff)
clk: imx: Free pll on error path
For an unknown pll type the error path neglects to free the memory just allocated. Add the free. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/imx/clk-pll14xx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 7ec78dc3a80..f9fcec18f9f 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -409,6 +409,7 @@ struct clk *imx_clk_pll14xx(const char *name, const char *parent_name,
default:
pr_err("%s: Unknown pll type for pll clk %s\n",
__func__, name);
+ kfree(pll);
return ERR_PTR(-EINVAL);
};