diff options
Diffstat (limited to 'drivers/regulator/mc13783-regulator.c')
-rw-r--r-- | drivers/regulator/mc13783-regulator.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c index 8e9b90ad88ae..6c0face87ffe 100644 --- a/drivers/regulator/mc13783-regulator.c +++ b/drivers/regulator/mc13783-regulator.c | |||
@@ -344,6 +344,9 @@ static int __devinit mc13783_regulator_probe(struct platform_device *pdev) | |||
344 | 344 | ||
345 | dev_dbg(&pdev->dev, "%s id %d\n", __func__, pdev->id); | 345 | dev_dbg(&pdev->dev, "%s id %d\n", __func__, pdev->id); |
346 | 346 | ||
347 | if (!pdata) | ||
348 | return -EINVAL; | ||
349 | |||
347 | priv = devm_kzalloc(&pdev->dev, sizeof(*priv) + | 350 | priv = devm_kzalloc(&pdev->dev, sizeof(*priv) + |
348 | pdata->num_regulators * sizeof(priv->regulators[0]), | 351 | pdata->num_regulators * sizeof(priv->regulators[0]), |
349 | GFP_KERNEL); | 352 | GFP_KERNEL); |