diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 23:14:57 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 23:14:57 +0200 |
commit | 20731945ae743034353a88c307920d1f16cf8ac8 (patch) | |
tree | 132c796fe3a167dece8cec7a40b1d5dd83a68bc8 /drivers/i2c/chips/max6875.c | |
parent | [PATCH] Ensure that 'make distclean' does not delete files in '.git' (diff) | |
parent | [PATCH] I2C: add i2c module alias for i2c drivers to use (diff) | |
download | linux-20731945ae743034353a88c307920d1f16cf8ac8.tar.xz linux-20731945ae743034353a88c307920d1f16cf8ac8.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/i2c/chips/max6875.c')
-rw-r--r-- | drivers/i2c/chips/max6875.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c index 9e1aeb69abf9..b376a006883c 100644 --- a/drivers/i2c/chips/max6875.c +++ b/drivers/i2c/chips/max6875.c @@ -179,16 +179,14 @@ static int max6875_detect(struct i2c_adapter *adapter, int address, int kind) if (address & 1) return 0; - if (!(data = kmalloc(sizeof(struct max6875_data), GFP_KERNEL))) + if (!(data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL))) return -ENOMEM; - memset(data, 0, sizeof(struct max6875_data)); /* A fake client is created on the odd address */ - if (!(fake_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL))) { + if (!(fake_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL))) { err = -ENOMEM; goto exit_kfree1; } - memset(fake_client, 0, sizeof(struct i2c_client)); /* Init real i2c_client */ real_client = &data->client; |