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>
}
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(&pdev->dev, "Memory alloction failed\n");
+ if (!pdata)
return NULL;
- }
for (i = 0; i < num; i++) {
int id;
rdev = devm_kzalloc(&pdev->dev, TPS6586X_ID_MAX_REGULATOR *
sizeof(*rdev), GFP_KERNEL);
- if (!rdev) {
- dev_err(&pdev->dev, "Mmemory alloc failed\n");
+ if (!rdev)
return -ENOMEM;
- }
version = tps6586x_get_version(pdev->dev.parent);