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 <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody 2025-07-23 17:32:45 +01:00 committed by Fabio Estevam
parent 3526f990b7
commit b65ea8534f

View File

@ -409,6 +409,7 @@ struct clk *imx_clk_pll14xx(const char *name, const char *parent_name,
default: default:
pr_err("%s: Unknown pll type for pll clk %s\n", pr_err("%s: Unknown pll type for pll clk %s\n",
__func__, name); __func__, name);
kfree(pll);
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
}; };