提交 09ca50d2 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: as3711: Fix checking if no platform initialization data

To skip registering regulator if no platform initialization data,
we should check reg_data rather than ri->desc.name.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 836dc9e3
......@@ -303,7 +303,7 @@ static int as3711_regulator_probe(struct platform_device *pdev)
reg_data = pdata ? pdata->init_data[id] : NULL;
/* No need to register if there is no regulator data */
if (!ri->desc.name)
if (!reg_data)
continue;
reg = &regs[id];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册