Skip to contentSkip to conversation

hwmon: (max6650) Drop error message after memory allocation failures

PATCH In review Guenter Roeck 2 participants 2 messages Feb 12, 2014 – Feb 13, 2014

Subsystems (2)
lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 3/4 hwmon: (max6650) Drop error message after memory allocation failures

The core code already generates an error message.

---
 drivers/hwmon/max6650.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/hwmon/max6650.c +1 -3
index badff94..74916e7 100644
@@ -656,10 +656,8 @@ static int max6650_probe(struct i2c_client *client,
 
 	data = devm_kzalloc(&client->dev, sizeof(struct max6650_data),
 			    GFP_KERNEL);
-	if (!data) {
-		dev_err(&client->dev, "out of memory.\n");
+	if (!data)
 		return -ENOMEM;
-	}
 
 	data->client = client;
 	mutex_init(&data->update_lock);
Signature · 7 lines
1.7.9.7


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Reviewed-by on v1 3/4
#1 lore raw
Quoted 13 lines · Guenter Roeck

The core code already generates an error message.

---
 drivers/hwmon/max6650.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/hwmon/max6650.c +0 -0
index badff94..74916e7 100644
@@ -656,10 +656,8 @@ static int max6650_probe(struct i2c_client *client,
 

drivers/hwmon/max6650.c static int max6650_probe(struct i2c_client *client, · line 663

Quoted 10 lines
drivers/hwmon/max6650.c +1 -3
 	data = devm_kzalloc(&client->dev, sizeof(struct max6650_data),
 			    GFP_KERNEL);
-	if (!data) {
-		dev_err(&client->dev, "out of memory.\n");
+	if (!data)
 		return -ENOMEM;
-	}
 
 	data->client = client;
 	mutex_init(&data->update_lock);
Signature · 7 lines
Jean Delvare
Suse L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors