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

regulator: tps51632: 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
ef4bcf88 38dbfb59

+2 -6
+2 -6
drivers/regulator/tps51632-regulator.c
··· 227 227 struct device_node *np = dev->of_node; 228 228 229 229 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 230 - if (!pdata) { 231 - dev_err(dev, "Memory alloc failed for platform data\n"); 230 + if (!pdata) 232 231 return NULL; 233 - } 234 232 235 233 pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node); 236 234 if (!pdata->reg_init_data) { ··· 297 299 } 298 300 299 301 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); 300 - if (!tps) { 301 - dev_err(&client->dev, "Memory allocation failed\n"); 302 + if (!tps) 302 303 return -ENOMEM; 303 - } 304 304 305 305 tps->dev = &client->dev; 306 306 tps->desc.name = client->name;