aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 9a5ff97d158d..895f73887cf0 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1858,11 +1858,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
1858 goto clean; 1858 goto clean;
1859 } 1859 }
1860 1860
1861 /* set regulator constraints */
1862 ret = set_machine_constraints(rdev, &init_data->constraints);
1863 if (ret < 0)
1864 goto clean;
1865
1866 /* register with sysfs */ 1861 /* register with sysfs */
1867 rdev->dev.class = &regulator_class; 1862 rdev->dev.class = &regulator_class;
1868 rdev->dev.parent = dev; 1863 rdev->dev.parent = dev;
@@ -1874,6 +1869,11 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
1874 1869
1875 dev_set_drvdata(&rdev->dev, rdev); 1870 dev_set_drvdata(&rdev->dev, rdev);
1876 1871
1872 /* set regulator constraints */
1873 ret = set_machine_constraints(rdev, &init_data->constraints);
1874 if (ret < 0)
1875 goto scrub;
1876
1877 /* add attributes supported by this regulator */ 1877 /* add attributes supported by this regulator */
1878 ret = add_regulator_attributes(rdev); 1878 ret = add_regulator_attributes(rdev);
1879 if (ret < 0) 1879 if (ret < 0)