From: Sachin Kamat Date: Thu, 20 Feb 2014 08:53:01 +0000 (+0530) Subject: regulator: da9063: Remove redundant error message X-Git-Tag: firefly_0821_release~176^2~4202^2~5^5~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b5baa56f27369af57a755e364d02c02efed611b;p=firefly-linux-kernel-4.4.55.git regulator: da9063: Remove redundant error message kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index 3c65644f3007..4c09f759d05d 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -774,10 +774,8 @@ static int da9063_regulator_probe(struct platform_device *pdev) size = sizeof(struct da9063_regulators) + n_regulators * sizeof(struct da9063_regulator); regulators = devm_kzalloc(&pdev->dev, size, GFP_KERNEL); - if (!regulators) { - dev_err(&pdev->dev, "No memory for regulators\n"); + if (!regulators) return -ENOMEM; - } regulators->n_regulators = n_regulators; platform_set_drvdata(pdev, regulators);