mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-02 13:30:30 +00:00
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:
1 parent
e1ddded53b
commit
a8ae1d4fb9
3 files changed
+3
-4
No files matched your search
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user