diff options
| -rw-r--r-- | drivers/regulator/s5m8767.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index ef0532d56d43..8a831947c351 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c | |||
| @@ -659,17 +659,17 @@ static int s5m8767_pmic_probe(struct platform_device *pdev) | |||
| 659 | struct s5m8767_info *s5m8767; | 659 | struct s5m8767_info *s5m8767; |
| 660 | int i, ret, size, buck_init; | 660 | int i, ret, size, buck_init; |
| 661 | 661 | ||
| 662 | if (!pdata) { | ||
| 663 | dev_err(pdev->dev.parent, "Platform data not supplied\n"); | ||
| 664 | return -ENODEV; | ||
| 665 | } | ||
| 666 | |||
| 662 | if (iodev->dev->of_node) { | 667 | if (iodev->dev->of_node) { |
| 663 | ret = s5m8767_pmic_dt_parse_pdata(pdev, pdata); | 668 | ret = s5m8767_pmic_dt_parse_pdata(pdev, pdata); |
| 664 | if (ret) | 669 | if (ret) |
| 665 | return ret; | 670 | return ret; |
| 666 | } | 671 | } |
| 667 | 672 | ||
| 668 | if (!pdata) { | ||
| 669 | dev_err(pdev->dev.parent, "Platform data not supplied\n"); | ||
| 670 | return -ENODEV; | ||
| 671 | } | ||
| 672 | |||
| 673 | if (pdata->buck2_gpiodvs) { | 673 | if (pdata->buck2_gpiodvs) { |
| 674 | if (pdata->buck3_gpiodvs || pdata->buck4_gpiodvs) { | 674 | if (pdata->buck3_gpiodvs || pdata->buck4_gpiodvs) { |
| 675 | dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); | 675 | dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n"); |
