Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sachin Kamat and committed by
Mark Brown
bcb2c0d6 38dbfb59

+5 -16
+5 -16
drivers/regulator/tps65910-regulator.c
··· 1011 1011 1012 1012 pmic_plat_data = devm_kzalloc(&pdev->dev, sizeof(*pmic_plat_data), 1013 1013 GFP_KERNEL); 1014 - 1015 - if (!pmic_plat_data) { 1016 - dev_err(&pdev->dev, "Failure to alloc pdata for regulators.\n"); 1014 + if (!pmic_plat_data) 1017 1015 return NULL; 1018 - } 1019 1016 1020 1017 np = of_node_get(pdev->dev.parent->of_node); 1021 1018 regulators = of_get_child_by_name(np, "regulators"); ··· 1095 1098 } 1096 1099 1097 1100 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); 1098 - if (!pmic) { 1099 - dev_err(&pdev->dev, "Memory allocation failed for pmic\n"); 1101 + if (!pmic) 1100 1102 return -ENOMEM; 1101 - } 1102 1103 1103 1104 pmic->mfd = tps65910; 1104 1105 platform_set_drvdata(pdev, pmic); ··· 1125 1130 1126 1131 pmic->desc = devm_kzalloc(&pdev->dev, pmic->num_regulators * 1127 1132 sizeof(struct regulator_desc), GFP_KERNEL); 1128 - if (!pmic->desc) { 1129 - dev_err(&pdev->dev, "Memory alloc fails for desc\n"); 1133 + if (!pmic->desc) 1130 1134 return -ENOMEM; 1131 - } 1132 1135 1133 1136 pmic->info = devm_kzalloc(&pdev->dev, pmic->num_regulators * 1134 1137 sizeof(struct tps_info *), GFP_KERNEL); 1135 - if (!pmic->info) { 1136 - dev_err(&pdev->dev, "Memory alloc fails for info\n"); 1138 + if (!pmic->info) 1137 1139 return -ENOMEM; 1138 - } 1139 1140 1140 1141 pmic->rdev = devm_kzalloc(&pdev->dev, pmic->num_regulators * 1141 1142 sizeof(struct regulator_dev *), GFP_KERNEL); 1142 - if (!pmic->rdev) { 1143 - dev_err(&pdev->dev, "Memory alloc fails for rdev\n"); 1143 + if (!pmic->rdev) 1144 1144 return -ENOMEM; 1145 - } 1146 1145 1147 1146 for (i = 0; i < pmic->num_regulators && i < TPS65910_NUM_REGS; 1148 1147 i++, info++) {