aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/ti-abb-regulator.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c
index 75fa64769b4b..a2dabb575b97 100644
--- a/drivers/regulator/ti-abb-regulator.c
+++ b/drivers/regulator/ti-abb-regulator.c
@@ -533,20 +533,15 @@ static int ti_abb_init_table(struct device *dev, struct ti_abb *abb,
533 num_entries /= num_values; 533 num_entries /= num_values;
534 534
535 info = devm_kzalloc(dev, sizeof(*info) * num_entries, GFP_KERNEL); 535 info = devm_kzalloc(dev, sizeof(*info) * num_entries, GFP_KERNEL);
536 if (!info) { 536 if (!info)
537 dev_err(dev, "Can't allocate info table for '%s' property\n",
538 pname);
539 return -ENOMEM; 537 return -ENOMEM;
540 } 538
541 abb->info = info; 539 abb->info = info;
542 540
543 volt_table = devm_kzalloc(dev, sizeof(unsigned int) * num_entries, 541 volt_table = devm_kzalloc(dev, sizeof(unsigned int) * num_entries,
544 GFP_KERNEL); 542 GFP_KERNEL);
545 if (!volt_table) { 543 if (!volt_table)
546 dev_err(dev, "Can't allocate voltage table for '%s' property\n",
547 pname);
548 return -ENOMEM; 544 return -ENOMEM;
549 }
550 545
551 abb->rdesc.n_voltages = num_entries; 546 abb->rdesc.n_voltages = num_entries;
552 abb->rdesc.volt_table = volt_table; 547 abb->rdesc.volt_table = volt_table;