Skip to contentSkip to conversation

clk: imx: pll14xx: Return error if pll type is invalid

PATCH Applied Anson Huang 3 participants 3 messages Feb 21, 2020 – Feb 24, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/clk/imx/clk-pll14xx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/imx/clk-pll14xx.c +2 -0
index 37e311e..a83bbbe 100644
@@ -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;
Signature · 1 line
2.7.4