diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2020-02-21 07:31:56 +0100 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2020-02-24 08:41:13 +0100 |
commit | 530cf8d49f2a650625eee6ce28793bd7974e14bd (patch) | |
tree | 3d63962a0e465e906e55af22ff0f710741b297b2 /drivers/clk | |
parent | clk: imx: imx8mp: fix a53 cpu clock (diff) | |
download | linux-530cf8d49f2a650625eee6ce28793bd7974e14bd.tar.xz linux-530cf8d49f2a650625eee6ce28793bd7974e14bd.zip |
clk: imx: pll14xx: Return error if pll type is invalid
When pll type is invalid, ONLY output error message is NOT enough,
should return error immediately.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/imx/clk-pll14xx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index 37e311e1d058..a83bbbee77d9 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -410,6 +410,8 @@ struct clk_hw *imx_clk_hw_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); }; pll->base = base; |