summaryrefslogtreecommitdiff
path: root/drivers/regulator/max8907-regulator.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-20 14:23:07 +0530
committerMark Brown <broonie@linaro.org>2014-02-20 20:23:18 +0900
commitd016bdc7f4e8b2848d8992f99e226f03abe53716 (patch)
treedcf21c4660dfd962e2b84d0134db964bc1306a15 /drivers/regulator/max8907-regulator.c
parentc61f1401391c4735490ebc04a07d1386787bbf49 (diff)
regulator: max8907: 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/max8907-regulator.c')
-rw-r--r--drivers/regulator/max8907-regulator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index afda8c6af721..ed90c759c231 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -292,10 +292,9 @@ static int max8907_regulator_probe(struct platform_device *pdev)
return ret;
pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
- if (!pmic) {
- dev_err(&pdev->dev, "Failed to alloc pmic\n");
+ if (!pmic)
return -ENOMEM;
- }
+
platform_set_drvdata(pdev, pmic);
memcpy(pmic->desc, max8907_regulators, sizeof(pmic->desc));