aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps6586x-regulator.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-20 14:23:17 +0530
committerMark Brown <broonie@linaro.org>2014-02-20 20:57:06 +0900
commit02e905845fb722be50d605bdcb277bad6a6bfe66 (patch)
treef59c0353a3bfba5ef0bc70d87d0c08b6174e5268 /drivers/regulator/tps6586x-regulator.c
parentLinus 3.14-rc1 (diff)
downloadlinux-dev-02e905845fb722be50d605bdcb277bad6a6bfe66.tar.xz
linux-dev-02e905845fb722be50d605bdcb277bad6a6bfe66.zip
regulator: tps6586x: 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>
Diffstat (limited to 'drivers/regulator/tps6586x-regulator.c')
-rw-r--r--drivers/regulator/tps6586x-regulator.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 0485d47f0d8a..e36f3569767f 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -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;
@@ -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);