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

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>

authored by

Sachin Kamat and committed by
Mark Brown
0ad91c69 026cdfe6

+3 -9
+3 -9
drivers/regulator/tps65090-regulator.c
··· 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) { ··· 249 253 250 254 pmic = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX * sizeof(*pmic), 251 255 GFP_KERNEL); 252 - if (!pmic) { 253 - dev_err(&pdev->dev, "mem alloc for pmic failed\n"); 256 + if (!pmic) 254 257 return -ENOMEM; 255 - } 256 258 257 259 for (num = 0; num < TPS65090_REGULATOR_MAX; num++) { 258 260 tps_pdata = tps65090_pdata->reg_pdata[num];