From: Sachin Kamat Date: Thu, 20 Feb 2014 08:53:04 +0000 (+0530) Subject: regulator: fan53555: Remove redundant error message X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=df948bbf486817565f0e3c8b65e6cc0bbc13f0eb;p=deliverable%2Flinux.git regulator: fan53555: Remove redundant error message kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat Cc: Yunfan Zhang Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index a10df7d150cc..714fd9a89aa1 100644 --- a/drivers/regulator/fan53555.c +++ b/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), GFP_KERNEL); - if (!di) { - dev_err(&client->dev, "Failed to allocate device info data!\n"); + if (!di) return -ENOMEM; - } + di->regmap = devm_regmap_init_i2c(client, &fan53555_regmap_config); if (IS_ERR(di->regmap)) { dev_err(&client->dev, "Failed to allocate regmap!\n");