Skip to content

Commit

Permalink
[PATCH] net: Kill some unneeded allocation return value casts in libe…
Browse files Browse the repository at this point in the history
…rtas

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>
  • Loading branch information
Jesper Juhl authored and David S. Miller committed Oct 10, 2007
1 parent 4b04f19 commit 655b4d1
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/libertas/debugfs.c
Original file line number Diff line number Diff line change
@@ -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;

3 changes: 1 addition & 2 deletions drivers/net/wireless/libertas/ethtool.c
Original file line number Diff line number Diff line change
@@ -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));

0 comments on commit 655b4d1

Please sign in to comment.