diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-10-17 17:14:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:12 -0400 |
commit | deb875c7ff2ef417a2daff41ee4b357098b7ab10 (patch) | |
tree | aad952c341d91e9c6bda7653d73bb8f2624dd8a0 /drivers/i2c/busses/i2c-amd756-s4882.c | |
parent | 078d9fe4fe8dada13e37d2e2790b0ad780324097 (diff) |
[PATCH] i2c: kzalloc cleanups, 2 of 2
Use kzalloc instead of kmalloc in the S4882 SMBus multiplexing driver.
I guess it's safer that way.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-amd756-s4882.c')
-rw-r--r-- | drivers/i2c/busses/i2c-amd756-s4882.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c index 4e553e8c5cba..f51ab652300a 100644 --- a/drivers/i2c/busses/i2c-amd756-s4882.c +++ b/drivers/i2c/busses/i2c-amd756-s4882.c | |||
@@ -169,12 +169,12 @@ static int __init amd756_s4882_init(void) | |||
169 | init_MUTEX(&amd756_lock); | 169 | init_MUTEX(&amd756_lock); |
170 | 170 | ||
171 | /* Define the 5 virtual adapters and algorithms structures */ | 171 | /* Define the 5 virtual adapters and algorithms structures */ |
172 | if (!(s4882_adapter = kmalloc(5 * sizeof(struct i2c_adapter), | 172 | if (!(s4882_adapter = kzalloc(5 * sizeof(struct i2c_adapter), |
173 | GFP_KERNEL))) { | 173 | GFP_KERNEL))) { |
174 | error = -ENOMEM; | 174 | error = -ENOMEM; |
175 | goto ERROR1; | 175 | goto ERROR1; |
176 | } | 176 | } |
177 | if (!(s4882_algo = kmalloc(5 * sizeof(struct i2c_algorithm), | 177 | if (!(s4882_algo = kzalloc(5 * sizeof(struct i2c_algorithm), |
178 | GFP_KERNEL))) { | 178 | GFP_KERNEL))) { |
179 | error = -ENOMEM; | 179 | error = -ENOMEM; |
180 | goto ERROR2; | 180 | goto ERROR2; |