diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 84202eaace57..65e07b941a36 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1691,6 +1691,9 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | |||
1691 | !regulator_desc->type == REGULATOR_CURRENT) | 1691 | !regulator_desc->type == REGULATOR_CURRENT) |
1692 | return ERR_PTR(-EINVAL); | 1692 | return ERR_PTR(-EINVAL); |
1693 | 1693 | ||
1694 | if (!init_data) | ||
1695 | return ERR_PTR(-EINVAL); | ||
1696 | |||
1694 | rdev = kzalloc(sizeof(struct regulator_dev), GFP_KERNEL); | 1697 | rdev = kzalloc(sizeof(struct regulator_dev), GFP_KERNEL); |
1695 | if (rdev == NULL) | 1698 | if (rdev == NULL) |
1696 | return ERR_PTR(-ENOMEM); | 1699 | return ERR_PTR(-ENOMEM); |