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>
This commit is contained in:
Sachin Kamat 2014-02-20 14:23:07 +05:30 committed by Mark Brown
parent c61f140139
commit d016bdc7f4
1 changed files with 2 additions and 3 deletions

View File

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