aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/max6875.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-10-17 17:09:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:12 -0400
commit5263ebb51eb098b01caf229498c954999117e4a7 (patch)
treef18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/chips/max6875.c
parentba9c2e8d15da029ea3051c95e446b2d638ef02e2 (diff)
[PATCH] i2c: kzalloc conversion, other drivers
Use kzalloc instead of kmalloc+memset in all remaining i2c bus and chip 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/i2c/chips/max6875.c')
-rw-r--r--drivers/i2c/chips/max6875.c6
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)
179 if (address & 1) 179 if (address & 1)
180 return 0; 180 return 0;
181 181
182 if (!(data = kmalloc(sizeof(struct max6875_data), GFP_KERNEL))) 182 if (!(data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL)))
183 return -ENOMEM; 183 return -ENOMEM;
184 memset(data, 0, sizeof(struct max6875_data));
185 184
186 /* A fake client is created on the odd address */ 185 /* A fake client is created on the odd address */
187 if (!(fake_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL))) { 186 if (!(fake_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL))) {
188 err = -ENOMEM; 187 err = -ENOMEM;
189 goto exit_kfree1; 188 goto exit_kfree1;
190 } 189 }
191 memset(fake_client, 0, sizeof(struct i2c_client));
192 190
193 /* Init real i2c_client */ 191 /* Init real i2c_client */
194 real_client = &data->client; 192 real_client = &data->client;