projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
regulator: mc13783: bail out without platform data
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
regulator
/
mc13783-regulator.c
diff --git
a/drivers/regulator/mc13783-regulator.c
b/drivers/regulator/mc13783-regulator.c
index 8e9b90ad88ae35cea58ef488c41ba1383da918e2..6c0face87ffe834db5d69fb19d85f3e1d4ace9b5 100644
(file)
--- 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)
dev_dbg(&pdev->dev, "%s id %d\n", __func__, pdev->id);
+ if (!pdata)
+ return -EINVAL;
+
priv = devm_kzalloc(&pdev->dev, sizeof(*priv) +
pdata->num_regulators * sizeof(priv->regulators[0]),
GFP_KERNEL);