diff options
author | Deepak Saxena <dsaxena@plexity.net> | 2005-10-17 17:08:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:12 -0400 |
commit | ba9c2e8d15da029ea3051c95e446b2d638ef02e2 (patch) | |
tree | 28272b92080f18f16008c09464190939183c8698 /drivers/hwmon/w83l785ts.c | |
parent | 2286066faf51890e49ad61e2ceab683666cd9108 (diff) |
[PATCH] hwmon: kzalloc conversion
Use kzalloc instead of kmalloc+memset in all hardware monitoring
drivers.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 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. */ |