]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] i2c: kzalloc cleanups, 1 of 2
authorJean Delvare <khali@linux-fr.org>
Mon, 17 Oct 2005 21:12:36 +0000 (23:12 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 21:02:12 +0000 (14:02 -0700)
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>
drivers/i2c/busses/i2c-keywest.c
drivers/i2c/busses/i2c-nforce2.c

index ef281e0c567be64fb65b857010d1d8606c746308..d61f748278fc47de6e2e9a889b443cc308cbcd35 100644 (file)
@@ -535,7 +535,7 @@ create_iface(struct device_node *np, struct device *dev)
 
        tsize = sizeof(struct keywest_iface) +
                (sizeof(struct keywest_chan) + 4) * nchan;
-       iface = (struct keywest_iface *) kzalloc(tsize, GFP_KERNEL);
+       iface = kzalloc(tsize, GFP_KERNEL);
        if (iface == NULL) {
                printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n");
                pmac_low_i2c_unlock(np);
index 87b6e26aa8a0bd13e65544aa2e0312671daa83d9..9b4247610815a6bc2f94007be4e897e937b32d3e 100644 (file)
@@ -313,8 +313,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 *)kzalloc(2*sizeof(struct nforce2_smbus),
-                                       GFP_KERNEL)))
+       if (!(smbuses = kzalloc(2*sizeof(struct nforce2_smbus), GFP_KERNEL)))
                return -ENOMEM;
        pci_set_drvdata(dev, smbuses);