[PATCH] net: Kill some unneeded allocation return value casts in libertas
authorJesper Juhl <jesper.juhl@gmail.com>
Fri, 24 Aug 2007 15:48:16 +0000 (11:48 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:37 +0000 (16:50 -0700)
kmalloc() and friends return void*, no need to cast it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/debugfs.c
drivers/net/wireless/libertas/ethtool.c

index 6d95148e8725a5e7cdbefd3ac19ddd60868662ea..816f42e4f5b49d484a1af11139313e1aa47ac7b9 100644 (file)
@@ -1838,7 +1838,7 @@ static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
        char *p2;
        struct debug_data *d = (struct debug_data *)f->private_data;
 
-       pdata = (char *)kmalloc(cnt, GFP_KERNEL);
+       pdata = kmalloc(cnt, GFP_KERNEL);
        if (pdata == NULL)
                return 0;
 
index ec99cb825871f7ce464863c95f885050a0c731fe..d793d843f7d5a95476a08662571cfa3666d95d18 100644 (file)
@@ -60,8 +60,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
 
 //      mutex_lock(&priv->mutex);
 
-       adapter->prdeeprom =
-                   (char *)kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL);
+       adapter->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL);
        if (!adapter->prdeeprom)
                return -ENOMEM;
        memcpy(adapter->prdeeprom, &regctrl, sizeof(regctrl));