All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: imx: pll14xx: Return error if pll type is invalid
@ 2020-02-21  6:31 ` Anson Huang
  0 siblings, 0 replies; 6+ messages in thread
From: Anson Huang @ 2020-02-21  6:31 UTC (permalink / raw)
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
	leonard.crestez, peng.fan, yuehaibing, ping.bai, linux-clk,
	linux-arm-kernel, linux-kernel
  Cc: Linux-imx

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>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-24  7:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21  6:31 [PATCH] clk: imx: pll14xx: Return error if pll type is invalid Anson Huang
2020-02-21  6:31 ` Anson Huang
2020-02-21 23:57 ` Stephen Boyd
2020-02-21 23:57   ` Stephen Boyd
2020-02-24  7:43 ` Shawn Guo
2020-02-24  7:43   ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.