summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-01-16 10:20:15 -0800
committerGuenter Roeck <linux@roeck-us.net>2013-02-06 09:57:59 -0800
commit77493ef60f4586a58f83a3a00a55eeb733b4eff3 (patch)
treea1e7c843b79650e63d3ea6541f44d0a048f6ced3 /drivers/hwmon
parentceeadc5c5187b78ffbea737c7a82ecc1e31e80df (diff)
downloadop-kernel-dev-77493ef60f4586a58f83a3a00a55eeb733b4eff3.zip
op-kernel-dev-77493ef60f4586a58f83a3a00a55eeb733b4eff3.tar.gz
hwmon: (pmbus) Drop unnecessary error messages in probe error path
Drop error messages due to implementation errors and due to memory allocation errors. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/pmbus/pmbus_core.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index dbacde6..e3eb324 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -1685,10 +1685,8 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
struct pmbus_data *data;
int ret;
- if (!info) {
- dev_err(&client->dev, "Missing chip information");
+ if (!info)
return -ENODEV;
- }
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE
| I2C_FUNC_SMBUS_BYTE_DATA
@@ -1696,10 +1694,8 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
return -ENODEV;
data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
- if (!data) {
- dev_err(&client->dev, "No memory to allocate driver data\n");
+ if (!data)
return -ENOMEM;
- }
i2c_set_clientdata(client, data);
mutex_init(&data->update_lock);
@@ -1739,31 +1735,23 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id,
ret = -ENOMEM;
data->sensors = devm_kzalloc(&client->dev, sizeof(struct pmbus_sensor)
* data->max_sensors, GFP_KERNEL);
- if (!data->sensors) {
- dev_err(&client->dev, "No memory to allocate sensor data\n");
+ if (!data->sensors)
return -ENOMEM;
- }
data->booleans = devm_kzalloc(&client->dev, sizeof(struct pmbus_boolean)
* data->max_booleans, GFP_KERNEL);
- if (!data->booleans) {
- dev_err(&client->dev, "No memory to allocate boolean data\n");
+ if (!data->booleans)
return -ENOMEM;
- }
data->labels = devm_kzalloc(&client->dev, sizeof(struct pmbus_label)
* data->max_labels, GFP_KERNEL);
- if (!data->labels) {
- dev_err(&client->dev, "No memory to allocate label data\n");
+ if (!data->labels)
return -ENOMEM;
- }
data->attributes = devm_kzalloc(&client->dev, sizeof(struct attribute *)
* data->max_attributes, GFP_KERNEL);
- if (!data->attributes) {
- dev_err(&client->dev, "No memory to allocate attribute data\n");
+ if (!data->attributes)
return -ENOMEM;
- }
pmbus_find_attributes(client, data);
OpenPOWER on IntegriCloud