Drop useless cast on kmalloc return (backport from Linux 2.6).

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3126 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2005-10-18 06:07:39 +00:00
1 parent e1ddded53b
commit a8ae1d4fb9
3 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -362,7 +362,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
if (~pci_resource_flags(dev, 0) & IORESOURCE_IO)
return -1;
if (!(smbus = (void*)kmalloc(sizeof(struct amd_smbus), GFP_KERNEL)))
if (!(smbus = kmalloc(sizeof(struct amd_smbus), GFP_KERNEL)))
return -1;
memset(smbus, 0, sizeof(struct amd_smbus));
+1 -1
View File
@@ -462,7 +462,7 @@ create_iface(struct device_node* np)
tsize = sizeof(struct keywest_iface) +
(sizeof(struct keywest_chan) + 4) * nchan;
iface = (struct keywest_iface *) kmalloc(tsize, GFP_KERNEL);
iface = kmalloc(tsize, GFP_KERNEL);
if (iface == NULL) {
printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n");
return -ENOMEM;
+1 -2
View File
@@ -348,8 +348,7 @@ 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),
GFP_KERNEL)))
if (!(smbuses = kmalloc(2*sizeof(struct nforce2_smbus), GFP_KERNEL)))
return -ENOMEM;
memset (smbuses, 0, 2*sizeof(struct nforce2_smbus));
pci_set_drvdata(dev, smbuses);