summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-nforce2.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-10-18 01:09:43 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-29 01:02:12 +0400
commit5263ebb51eb098b01caf229498c954999117e4a7 (patch)
treef18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/busses/i2c-nforce2.c
parentba9c2e8d15da029ea3051c95e446b2d638ef02e2 (diff)
downloadlinux-5263ebb51eb098b01caf229498c954999117e4a7.tar.xz
[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/busses/i2c-nforce2.c')
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 5dc62114cc8d..87b6e26aa8a0 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -313,10 +313,9 @@ static int __devinit nforce2_probe(struct pci_dev *dev, const struct pci_device_
int res1, res2;
/* we support 2 SMBus adapters */
- if (!(smbuses = (void *)kmalloc(2*sizeof(struct nforce2_smbus),
+ if (!(smbuses = (void *)kzalloc(2*sizeof(struct nforce2_smbus),
GFP_KERNEL)))
return -ENOMEM;
- memset (smbuses, 0, 2*sizeof(struct nforce2_smbus));
pci_set_drvdata(dev, smbuses);
/* SMBus adapter 1 */