Skip to content

Commit

Permalink
regulator: tps6586x: Remove redundant error message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Mark Brown committed Feb 20, 2014
1 parent 38dbfb5 commit 02e9058
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/regulator/tps6586x-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,8 @@ static struct tps6586x_platform_data *tps6586x_parse_regulator_dt(
}

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;
Expand Down Expand Up @@ -420,10 +418,8 @@ static int tps6586x_regulator_probe(struct platform_device *pdev)

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);

Expand Down

0 comments on commit 02e9058

Please sign in to comment.