summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-01-26 17:57:05 +0000
committerMark Brown <broonie@kernel.org>2018-01-26 17:57:05 +0000
commit4e79f3f1c832fc9eabf5435d73ba0279e58f9b9d (patch)
tree89378f0fe0b76cb3040fcd58280f2e251c65c1a8 /drivers
parentcf1ba3bb9b79b53ad2a5d72990be0ca36902c0f1 (diff)
parent5597bfb474d3ed84c1e0c73db620a257bbe127b6 (diff)
downloadlinux-4e79f3f1c832fc9eabf5435d73ba0279e58f9b9d.tar.bz2
Merge remote-tracking branch 'regulator/topic/tps65218' into regulator-next
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/tps65218-regulator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index bc489958fed7..1827185beacc 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -28,9 +28,6 @@
#include <linux/regulator/machine.h>
#include <linux/mfd/tps65218.h>
-enum tps65218_regulators { DCDC1, DCDC2, DCDC3, DCDC4,
- DCDC5, DCDC6, LDO1, LS3 };
-
#define TPS65218_REGULATOR(_name, _of, _id, _type, _ops, _n, _vr, _vm, _er, \
_em, _cr, _cm, _lr, _nlr, _delay, _fuv, _sr, _sm) \
{ \
@@ -329,6 +326,8 @@ static int tps65218_regulator_probe(struct platform_device *pdev)
/* Allocate memory for strobes */
tps->strobes = devm_kzalloc(&pdev->dev, sizeof(u8) *
TPS65218_NUM_REGULATOR, GFP_KERNEL);
+ if (!tps->strobes)
+ return -ENOMEM;
for (i = 0; i < ARRAY_SIZE(regulators); i++) {
rdev = devm_regulator_register(&pdev->dev, &regulators[i],