Browse Source

regulator: fixed: 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>
Sachin Kamat 11 years ago
parent
commit
f1b3f9031d
1 changed files with 1 additions and 3 deletions
  1. 1 3
      drivers/regulator/fixed.c

+ 1 - 3
drivers/regulator/fixed.c

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