aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps65910-regulator.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-20 03:53:18 -0500
committerMark Brown <broonie@linaro.org>2014-02-20 07:01:27 -0500
commitbcb2c0d69178854b291843aaebbf0cb77382b04b (patch)
treef2146796b2de283d930ffeacb78eca2bb5c19a7d /drivers/regulator/tps65910-regulator.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
regulator: tps65910: Remove redundant error message
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/tps65910-regulator.c')
-rw-r--r--drivers/regulator/tps65910-regulator.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index f50dd847eebc..fa7db8847578 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1011,11 +1011,8 @@ static struct tps65910_board *tps65910_parse_dt_reg_data(
1011 1011
1012 pmic_plat_data = devm_kzalloc(&pdev->dev, sizeof(*pmic_plat_data), 1012 pmic_plat_data = devm_kzalloc(&pdev->dev, sizeof(*pmic_plat_data),
1013 GFP_KERNEL); 1013 GFP_KERNEL);
1014 1014 if (!pmic_plat_data)
1015 if (!pmic_plat_data) {
1016 dev_err(&pdev->dev, "Failure to alloc pdata for regulators.\n");
1017 return NULL; 1015 return NULL;
1018 }
1019 1016
1020 np = of_node_get(pdev->dev.parent->of_node); 1017 np = of_node_get(pdev->dev.parent->of_node);
1021 regulators = of_get_child_by_name(np, "regulators"); 1018 regulators = of_get_child_by_name(np, "regulators");
@@ -1098,10 +1095,8 @@ static int tps65910_probe(struct platform_device *pdev)
1098 } 1095 }
1099 1096
1100 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); 1097 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
1101 if (!pmic) { 1098 if (!pmic)
1102 dev_err(&pdev->dev, "Memory allocation failed for pmic\n");
1103 return -ENOMEM; 1099 return -ENOMEM;
1104 }
1105 1100
1106 pmic->mfd = tps65910; 1101 pmic->mfd = tps65910;
1107 platform_set_drvdata(pdev, pmic); 1102 platform_set_drvdata(pdev, pmic);
@@ -1130,24 +1125,18 @@ static int tps65910_probe(struct platform_device *pdev)
1130 1125
1131 pmic->desc = devm_kzalloc(&pdev->dev, pmic->num_regulators * 1126 pmic->desc = devm_kzalloc(&pdev->dev, pmic->num_regulators *
1132 sizeof(struct regulator_desc), GFP_KERNEL); 1127 sizeof(struct regulator_desc), GFP_KERNEL);
1133 if (!pmic->desc) { 1128 if (!pmic->desc)
1134 dev_err(&pdev->dev, "Memory alloc fails for desc\n");
1135 return -ENOMEM; 1129 return -ENOMEM;
1136 }
1137 1130
1138 pmic->info = devm_kzalloc(&pdev->dev, pmic->num_regulators * 1131 pmic->info = devm_kzalloc(&pdev->dev, pmic->num_regulators *
1139 sizeof(struct tps_info *), GFP_KERNEL); 1132 sizeof(struct tps_info *), GFP_KERNEL);
1140 if (!pmic->info) { 1133 if (!pmic->info)
1141 dev_err(&pdev->dev, "Memory alloc fails for info\n");
1142 return -ENOMEM; 1134 return -ENOMEM;
1143 }
1144 1135
1145 pmic->rdev = devm_kzalloc(&pdev->dev, pmic->num_regulators * 1136 pmic->rdev = devm_kzalloc(&pdev->dev, pmic->num_regulators *
1146 sizeof(struct regulator_dev *), GFP_KERNEL); 1137 sizeof(struct regulator_dev *), GFP_KERNEL);
1147 if (!pmic->rdev) { 1138 if (!pmic->rdev)
1148 dev_err(&pdev->dev, "Memory alloc fails for rdev\n");
1149 return -ENOMEM; 1139 return -ENOMEM;
1150 }
1151 1140
1152 for (i = 0; i < pmic->num_regulators && i < TPS65910_NUM_REGS; 1141 for (i = 0; i < pmic->num_regulators && i < TPS65910_NUM_REGS;
1153 i++, info++) { 1142 i++, info++) {