diff options
-rw-r--r-- | drivers/regulator/tps65217-regulator.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c index d58db72a63b0..1cf16aed9735 100644 --- a/drivers/regulator/tps65217-regulator.c +++ b/drivers/regulator/tps65217-regulator.c | |||
@@ -230,11 +230,6 @@ static int tps65217_regulator_probe(struct platform_device *pdev) | |||
230 | if (tps->dev->of_node) | 230 | if (tps->dev->of_node) |
231 | pdata = tps65217_parse_dt(pdev); | 231 | pdata = tps65217_parse_dt(pdev); |
232 | 232 | ||
233 | if (!pdata) { | ||
234 | dev_err(&pdev->dev, "Platform data not found\n"); | ||
235 | return -EINVAL; | ||
236 | } | ||
237 | |||
238 | if (tps65217_chip_id(tps) != TPS65217) { | 233 | if (tps65217_chip_id(tps) != TPS65217) { |
239 | dev_err(&pdev->dev, "Invalid tps chip version\n"); | 234 | dev_err(&pdev->dev, "Invalid tps chip version\n"); |
240 | return -ENODEV; | 235 | return -ENODEV; |
@@ -245,7 +240,8 @@ static int tps65217_regulator_probe(struct platform_device *pdev) | |||
245 | for (i = 0; i < TPS65217_NUM_REGULATOR; i++) { | 240 | for (i = 0; i < TPS65217_NUM_REGULATOR; i++) { |
246 | /* Register the regulators */ | 241 | /* Register the regulators */ |
247 | config.dev = tps->dev; | 242 | config.dev = tps->dev; |
248 | config.init_data = pdata->tps65217_init_data[i]; | 243 | if (pdata) |
244 | config.init_data = pdata->tps65217_init_data[i]; | ||
249 | config.driver_data = tps; | 245 | config.driver_data = tps; |
250 | config.regmap = tps->regmap; | 246 | config.regmap = tps->regmap; |
251 | if (tps->dev->of_node) | 247 | if (tps->dev->of_node) |