Commit 09ca50d2 authored by Axel Lin's avatar Axel Lin Committed by 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: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment