2020-02-21 06:38:28

by Anson Huang

[permalink] [raw]
Subject: [PATCH] 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 <[email protected]>
---
drivers/clk/imx/clk-pll14xx.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 37e311e..a83bbbe 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;
--
2.7.4


2020-02-21 23:59:48

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] clk: imx: pll14xx: Return error if pll type is invalid

Quoting Anson Huang (2020-02-20 22:31:56)
> When pll type is invalid, ONLY output error message is NOT enough,
> should return error immediately.
>
> Signed-off-by: Anson Huang <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2020-02-24 07:45:18

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH] clk: imx: pll14xx: Return error if pll type is invalid

On Fri, Feb 21, 2020 at 02:31:56PM +0800, Anson Huang wrote:
> When pll type is invalid, ONLY output error message is NOT enough,
> should return error immediately.
>
> Signed-off-by: Anson Huang <[email protected]>

Applied, thanks.