Skip to content

Commit

Permalink
regulator: as3711: Fix checking if no platform initialization data
Browse files Browse the repository at this point in the history
To skip registering regulator if no platform initialization data,
we should check reg_data rather than ri->desc.name.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Feb 13, 2013
1 parent 836dc9e commit 09ca50d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/as3711-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 09ca50d

Please sign in to comment.