mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-21 09:21:33 +01:00
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:
parent
3526f990b7
commit
b65ea8534f
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user