diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-01-16 13:20:15 -0500 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-02-06 12:57:59 -0500 |
commit | 77493ef60f4586a58f83a3a00a55eeb733b4eff3 (patch) | |
tree | a1e7c843b79650e63d3ea6541f44d0a048f6ced3 /drivers/hwmon | |
parent | ceeadc5c5187b78ffbea737c7a82ecc1e31e80df (diff) |
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.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index dbacde6abaa8..e3eb3249d912 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, | |||
1685 | struct pmbus_data *data; | 1685 | struct pmbus_data *data; |
1686 | int ret; | 1686 | int ret; |
1687 | 1687 | ||
1688 | if (!info) { | 1688 | if (!info) |
1689 | dev_err(&client->dev, "Missing chip information"); | ||
1690 | return -ENODEV; | 1689 | return -ENODEV; |
1691 | } | ||
1692 | 1690 | ||
1693 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE | 1691 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE |
1694 | | I2C_FUNC_SMBUS_BYTE_DATA | 1692 | | I2C_FUNC_SMBUS_BYTE_DATA |
@@ -1696,10 +1694,8 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, | |||
1696 | return -ENODEV; | 1694 | return -ENODEV; |
1697 | 1695 | ||
1698 | data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); | 1696 | data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); |
1699 | if (!data) { | 1697 | if (!data) |
1700 | dev_err(&client->dev, "No memory to allocate driver data\n"); | ||
1701 | return -ENOMEM; | 1698 | return -ENOMEM; |
1702 | } | ||
1703 | 1699 | ||
1704 | i2c_set_clientdata(client, data); | 1700 | i2c_set_clientdata(client, data); |
1705 | mutex_init(&data->update_lock); | 1701 | mutex_init(&data->update_lock); |
@@ -1739,31 +1735,23 @@ int pmbus_do_probe(struct i2c_client *client, const struct i2c_device_id *id, | |||
1739 | ret = -ENOMEM; | 1735 | ret = -ENOMEM; |
1740 | data->sensors = devm_kzalloc(&client->dev, sizeof(struct pmbus_sensor) | 1736 | data->sensors = devm_kzalloc(&client->dev, sizeof(struct pmbus_sensor) |
1741 | * data->max_sensors, GFP_KERNEL); | 1737 | * data->max_sensors, GFP_KERNEL); |
1742 | if (!data->sensors) { | 1738 | if (!data->sensors) |
1743 | dev_err(&client->dev, "No memory to allocate sensor data\n"); | ||
1744 | return -ENOMEM; | 1739 | return -ENOMEM; |
1745 | } | ||
1746 | 1740 | ||
1747 | data->booleans = devm_kzalloc(&client->dev, sizeof(struct pmbus_boolean) | 1741 | data->booleans = devm_kzalloc(&client->dev, sizeof(struct pmbus_boolean) |
1748 | * data->max_booleans, GFP_KERNEL); | 1742 | * data->max_booleans, GFP_KERNEL); |
1749 | if (!data->booleans) { | 1743 | if (!data->booleans) |
1750 | dev_err(&client->dev, "No memory to allocate boolean data\n"); | ||
1751 | return -ENOMEM; | 1744 | return -ENOMEM; |
1752 | } | ||
1753 | 1745 | ||
1754 | data->labels = devm_kzalloc(&client->dev, sizeof(struct pmbus_label) | 1746 | data->labels = devm_kzalloc(&client->dev, sizeof(struct pmbus_label) |
1755 | * data->max_labels, GFP_KERNEL); | 1747 | * data->max_labels, GFP_KERNEL); |
1756 | if (!data->labels) { | 1748 | if (!data->labels) |
1757 | dev_err(&client->dev, "No memory to allocate label data\n"); | ||
1758 | return -ENOMEM; | 1749 | return -ENOMEM; |
1759 | } | ||
1760 | 1750 | ||
1761 | data->attributes = devm_kzalloc(&client->dev, sizeof(struct attribute *) | 1751 | data->attributes = devm_kzalloc(&client->dev, sizeof(struct attribute *) |
1762 | * data->max_attributes, GFP_KERNEL); | 1752 | * data->max_attributes, GFP_KERNEL); |
1763 | if (!data->attributes) { | 1753 | if (!data->attributes) |
1764 | dev_err(&client->dev, "No memory to allocate attribute data\n"); | ||
1765 | return -ENOMEM; | 1754 | return -ENOMEM; |
1766 | } | ||
1767 | 1755 | ||
1768 | pmbus_find_attributes(client, data); | 1756 | pmbus_find_attributes(client, data); |
1769 | 1757 | ||