diff options
Diffstat (limited to 'drivers/hwmon/w83l785ts.c')
-rw-r--r-- | drivers/hwmon/w83l785ts.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwmon/w83l785ts.c b/drivers/hwmon/w83l785ts.c index db12a620b33..f495b637866 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) if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) goto exit; - if (!(data = kmalloc(sizeof(struct w83l785ts_data), GFP_KERNEL))) { + if (!(data = kzalloc(sizeof(struct w83l785ts_data), GFP_KERNEL))) { err = -ENOMEM; goto exit; } - memset(data, 0, sizeof(struct w83l785ts_data)); - /* The common I2C client data is placed right before the * W83L785TS-specific data. */ |