浏览代码

regulator: gpio-regulator: Remove unneeded OOM error message

There is no need to print an OOM message after devm_kzalloc, since there is
a generic OOM message in place.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Fabio Estevam 11 年之前
父节点
当前提交
9c25960cbb
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      drivers/regulator/gpio-regulator.c

+ 1 - 3
drivers/regulator/gpio-regulator.c

@@ -239,10 +239,8 @@ static int gpio_regulator_probe(struct platform_device *pdev)
 
 	drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gpio_regulator_data),
 			       GFP_KERNEL);
-	if (drvdata == NULL) {
-		dev_err(&pdev->dev, "Failed to allocate device data\n");
+	if (drvdata == NULL)
 		return -ENOMEM;
-	}
 
 	drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL);
 	if (drvdata->desc.name == NULL) {