Skip to content

Commit ae523fc

Browse files
committed
Merge remote-tracking branch 'regulator/topic/dt' into regulator-next
2 parents 6806a66 + 22d881c commit ae523fc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/regulator/fixed.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,17 @@ static struct regulator_ops fixed_voltage_ops = {
163163

164164
static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
165165
{
166-
struct fixed_voltage_config *config = pdev->dev.platform_data;
166+
struct fixed_voltage_config *config;
167167
struct fixed_voltage_data *drvdata;
168168
int ret;
169169

170170
if (pdev->dev.of_node)
171171
config = of_get_fixed_voltage_config(&pdev->dev);
172+
else
173+
config = pdev->dev.platform_data;
174+
175+
if (!config)
176+
return -ENOMEM;
172177

173178
drvdata = kzalloc(sizeof(struct fixed_voltage_data), GFP_KERNEL);
174179
if (drvdata == NULL) {

0 commit comments

Comments
 (0)