浏览代码

regulator: fan53555: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Yunfan Zhang <yfzhang@marvell.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Sachin Kamat 11 年之前
父节点
当前提交
df948bbf48
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      drivers/regulator/fan53555.c

+ 2 - 3
drivers/regulator/fan53555.c

@@ -244,10 +244,9 @@ static int fan53555_regulator_probe(struct i2c_client *client,
 
 
 	di = devm_kzalloc(&client->dev, sizeof(struct fan53555_device_info),
 	di = devm_kzalloc(&client->dev, sizeof(struct fan53555_device_info),
 					GFP_KERNEL);
 					GFP_KERNEL);
-	if (!di) {
-		dev_err(&client->dev, "Failed to allocate device info data!\n");
+	if (!di)
 		return -ENOMEM;
 		return -ENOMEM;
-	}
+
 	di->regmap = devm_regmap_init_i2c(client, &fan53555_regmap_config);
 	di->regmap = devm_regmap_init_i2c(client, &fan53555_regmap_config);
 	if (IS_ERR(di->regmap)) {
 	if (IS_ERR(di->regmap)) {
 		dev_err(&client->dev, "Failed to allocate regmap!\n");
 		dev_err(&client->dev, "Failed to allocate regmap!\n");