瀏覽代碼

regulator: as3711: 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 年之前
父節點
當前提交
31833581de
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      drivers/regulator/as3711-regulator.c

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

@@ -245,10 +245,8 @@ static int as3711_regulator_probe(struct platform_device *pdev)
 
 	regs = devm_kzalloc(&pdev->dev, AS3711_REGULATOR_NUM *
 			sizeof(struct as3711_regulator), GFP_KERNEL);
-	if (!regs) {
-		dev_err(&pdev->dev, "Memory allocation failed exiting..\n");
+	if (!regs)
 		return -ENOMEM;
-	}
 
 	for (id = 0, ri = as3711_reg_info; id < AS3711_REGULATOR_NUM; ++id, ri++) {
 		reg = &regs[id];