diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-10-17 17:12:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:12 -0400 |
commit | 078d9fe4fe8dada13e37d2e2790b0ad780324097 (patch) | |
tree | dc878bab118133d65a78eb553d7eaa7ccb21cc84 /drivers/i2c | |
parent | 5263ebb51eb098b01caf229498c954999117e4a7 (diff) |
[PATCH] i2c: kzalloc cleanups, 1 of 2
Drop useless casts on kzalloc returned values, as suggested by
Jiri Slaby.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-keywest.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-nforce2.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-keywest.c b/drivers/i2c/busses/i2c-keywest.c index ef281e0c567b..d61f748278fc 100644 --- a/drivers/i2c/busses/i2c-keywest.c +++ b/drivers/i2c/busses/i2c-keywest.c | |||
@@ -535,7 +535,7 @@ create_iface(struct device_node *np, struct device *dev) | |||
535 | 535 | ||
536 | tsize = sizeof(struct keywest_iface) + | 536 | tsize = sizeof(struct keywest_iface) + |
537 | (sizeof(struct keywest_chan) + 4) * nchan; | 537 | (sizeof(struct keywest_chan) + 4) * nchan; |
538 | iface = (struct keywest_iface *) kzalloc(tsize, GFP_KERNEL); | 538 | iface = kzalloc(tsize, GFP_KERNEL); |
539 | if (iface == NULL) { | 539 | if (iface == NULL) { |
540 | printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n"); | 540 | printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n"); |
541 | pmac_low_i2c_unlock(np); | 541 | pmac_low_i2c_unlock(np); |
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index 87b6e26aa8a0..9b4247610815 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c | |||
@@ -313,8 +313,7 @@ static int __devinit nforce2_probe(struct pci_dev *dev, const struct pci_device_ | |||
313 | int res1, res2; | 313 | int res1, res2; |
314 | 314 | ||
315 | /* we support 2 SMBus adapters */ | 315 | /* we support 2 SMBus adapters */ |
316 | if (!(smbuses = (void *)kzalloc(2*sizeof(struct nforce2_smbus), | 316 | if (!(smbuses = kzalloc(2*sizeof(struct nforce2_smbus), GFP_KERNEL))) |
317 | GFP_KERNEL))) | ||
318 | return -ENOMEM; | 317 | return -ENOMEM; |
319 | pci_set_drvdata(dev, smbuses); | 318 | pci_set_drvdata(dev, smbuses); |
320 | 319 | ||