提交 4b864af1 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: Checking return value of of_get_regulator_init_data

of_get_regulator_init_data() may return NULL, thus
check the return value to avoid NULL pointer dereference.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 e69af5e9
......@@ -64,6 +64,9 @@ struct fixed_voltage_config *of_get_fixed_voltage_config(struct device *dev)
return NULL;
config->init_data = of_get_regulator_init_data(dev);
if (!config->init_data)
return NULL;
init_data = config->init_data;
config->supply_name = init_data->constraints.name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册