Commit 0ad91c69abed19c00dbb41f9c423fea0c64f7ef5

Authored by Sachin Kamat
Committed by Mark Brown
1 parent 026cdfe6f8

regulator: tps65090: 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>

Showing 1 changed file with 3 additions and 9 deletions Side-by-side Diff

drivers/regulator/tps65090-regulator.c
... ... @@ -168,17 +168,13 @@
168 168  
169 169 tps65090_pdata = devm_kzalloc(&pdev->dev, sizeof(*tps65090_pdata),
170 170 GFP_KERNEL);
171   - if (!tps65090_pdata) {
172   - dev_err(&pdev->dev, "Memory alloc for tps65090_pdata failed\n");
  171 + if (!tps65090_pdata)
173 172 return ERR_PTR(-ENOMEM);
174   - }
175 173  
176 174 reg_pdata = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX *
177 175 sizeof(*reg_pdata), GFP_KERNEL);
178   - if (!reg_pdata) {
179   - dev_err(&pdev->dev, "Memory alloc for reg_pdata failed\n");
  176 + if (!reg_pdata)
180 177 return ERR_PTR(-ENOMEM);
181   - }
182 178  
183 179 regulators = of_get_child_by_name(np, "regulators");
184 180 if (!regulators) {
185 181  
... ... @@ -253,10 +249,8 @@
253 249  
254 250 pmic = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX * sizeof(*pmic),
255 251 GFP_KERNEL);
256   - if (!pmic) {
257   - dev_err(&pdev->dev, "mem alloc for pmic failed\n");
  252 + if (!pmic)
258 253 return -ENOMEM;
259   - }
260 254  
261 255 for (num = 0; num < TPS65090_REGULATOR_MAX; num++) {
262 256 tps_pdata = tps65090_pdata->reg_pdata[num];