aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83l785ts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/w83l785ts.c')
-rw-r--r--drivers/hwmon/w83l785ts.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwmon/w83l785ts.c b/drivers/hwmon/w83l785ts.c
index db12a620b331..f495b6378668 100644
--- a/drivers/hwmon/w83l785ts.c
+++ b/drivers/hwmon/w83l785ts.c
@@ -156,12 +156,10 @@ static int w83l785ts_detect(struct i2c_adapter *adapter, int address, int kind)
156 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 156 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
157 goto exit; 157 goto exit;
158 158
159 if (!(data = kmalloc(sizeof(struct w83l785ts_data), GFP_KERNEL))) { 159 if (!(data = kzalloc(sizeof(struct w83l785ts_data), GFP_KERNEL))) {
160 err = -ENOMEM; 160 err = -ENOMEM;
161 goto exit; 161 goto exit;
162 } 162 }
163 memset(data, 0, sizeof(struct w83l785ts_data));
164
165 163
166 /* The common I2C client data is placed right before the 164 /* The common I2C client data is placed right before the
167 * W83L785TS-specific data. */ 165 * W83L785TS-specific data. */