From: Guenter Roeck Date: Wed, 12 Feb 2014 06:40:33 +0000 (-0800) Subject: hwmon: (max6650) Drop error message after memory allocation failures X-Git-Tag: firefly_0821_release~176^2~4199^2~11 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b5e33b6325a9d7e9410feda270020f17cf1507c;p=firefly-linux-kernel-4.4.55.git hwmon: (max6650) Drop error message after memory allocation failures The core code already generates an error message. Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index badff94edef8..74916e777264 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c @@ -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);