diff options
Diffstat (limited to 'drivers/hwmon/adm1031.c')
-rw-r--r-- | drivers/hwmon/adm1031.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c index 58338ed7c8a1..7c545d5eee45 100644 --- a/drivers/hwmon/adm1031.c +++ b/drivers/hwmon/adm1031.c | |||
@@ -740,11 +740,10 @@ static int adm1031_detect(struct i2c_adapter *adapter, int address, int kind) | |||
740 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 740 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
741 | goto exit; | 741 | goto exit; |
742 | 742 | ||
743 | if (!(data = kmalloc(sizeof(struct adm1031_data), GFP_KERNEL))) { | 743 | if (!(data = kzalloc(sizeof(struct adm1031_data), GFP_KERNEL))) { |
744 | err = -ENOMEM; | 744 | err = -ENOMEM; |
745 | goto exit; | 745 | goto exit; |
746 | } | 746 | } |
747 | memset(data, 0, sizeof(struct adm1031_data)); | ||
748 | 747 | ||
749 | new_client = &data->client; | 748 | new_client = &data->client; |
750 | i2c_set_clientdata(new_client, data); | 749 | i2c_set_clientdata(new_client, data); |