From: Axel Lin Date: Wed, 13 Feb 2013 01:34:48 +0000 (+0800) Subject: regulator: as3711: Fix checking if no platform initialization data X-Git-Tag: MMI-PSA29.97-13-9~15028^2~18^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09ca50d2ade7ed6b3b2653b771774cf360c3d56c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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: Axel Lin Acked-by: Guennadi Liakhovetski Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c index 2f1341db38a0..f0ba8c4eefa9 100644 --- a/drivers/regulator/as3711-regulator.c +++ b/drivers/regulator/as3711-regulator.c @@ -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 = ®s[id];