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

regulator: tps62360: 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
33e63ba6 38dbfb59

+2 -7
+2 -7
drivers/regulator/tps62360-regulator.c
··· 299 299 struct device_node *np = dev->of_node; 300 300 301 301 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 302 - if (!pdata) { 303 - dev_err(dev, "Memory alloc failed for platform data\n"); 302 + if (!pdata) 304 303 return NULL; 305 - } 306 304 307 305 pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node); 308 306 if (!pdata->reg_init_data) { ··· 375 377 } 376 378 377 379 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); 378 - if (!tps) { 379 - dev_err(&client->dev, "%s(): Memory allocation failed\n", 380 - __func__); 380 + if (!tps) 381 381 return -ENOMEM; 382 - } 383 382 384 383 tps->en_discharge = pdata->en_discharge; 385 384 tps->en_internal_pulldn = pdata->en_internal_pulldn;