提交 6b4ed8b0 编写于 作者: D Dan Carpenter 提交者: Pawel Moll

clk: vexpress: NULL dereference on error path

If the allocation fails then we dereference the NULL in the error path.
Just return directly.

Fixes: ed27ff1d ('clk: Versatile Express clock generators ("osc") driver')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NPawel Moll <pawel.moll@arm.com>
上级 a798c10f
......@@ -102,7 +102,7 @@ void __init vexpress_osc_of_setup(struct device_node *node)
osc = kzalloc(sizeof(*osc), GFP_KERNEL);
if (!osc)
goto error;
return;
osc->func = vexpress_config_func_get_by_node(node);
if (!osc->func) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部