Skip to content

Commit 4e79f3f

Browse files
committed
Merge remote-tracking branch 'regulator/topic/tps65218' into regulator-next
2 parents cf1ba3b + 5597bfb commit 4e79f3f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/regulator/tps65218-regulator.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#include <linux/regulator/machine.h>
2929
#include <linux/mfd/tps65218.h>
3030

31-
enum tps65218_regulators { DCDC1, DCDC2, DCDC3, DCDC4,
32-
DCDC5, DCDC6, LDO1, LS3 };
33-
3431
#define TPS65218_REGULATOR(_name, _of, _id, _type, _ops, _n, _vr, _vm, _er, \
3532
_em, _cr, _cm, _lr, _nlr, _delay, _fuv, _sr, _sm) \
3633
{ \
@@ -329,6 +326,8 @@ static int tps65218_regulator_probe(struct platform_device *pdev)
329326
/* Allocate memory for strobes */
330327
tps->strobes = devm_kzalloc(&pdev->dev, sizeof(u8) *
331328
TPS65218_NUM_REGULATOR, GFP_KERNEL);
329+
if (!tps->strobes)
330+
return -ENOMEM;
332331

333332
for (i = 0; i < ARRAY_SIZE(regulators); i++) {
334333
rdev = devm_regulator_register(&pdev->dev, &regulators[i],

0 commit comments

Comments
 (0)