[PATCH] net: Kill some unneeded allocation return value casts in libertas
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>
This commit is contained in:
Родитель
4b04f19625
Коммит
655b4d16ac
|
@ -1838,7 +1838,7 @@ static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
|
||||||
char *p2;
|
char *p2;
|
||||||
struct debug_data *d = (struct debug_data *)f->private_data;
|
struct debug_data *d = (struct debug_data *)f->private_data;
|
||||||
|
|
||||||
pdata = (char *)kmalloc(cnt, GFP_KERNEL);
|
pdata = kmalloc(cnt, GFP_KERNEL);
|
||||||
if (pdata == NULL)
|
if (pdata == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,7 @@ static int libertas_ethtool_get_eeprom(struct net_device *dev,
|
||||||
|
|
||||||
// mutex_lock(&priv->mutex);
|
// mutex_lock(&priv->mutex);
|
||||||
|
|
||||||
adapter->prdeeprom =
|
adapter->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL);
|
||||||
(char *)kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL);
|
|
||||||
if (!adapter->prdeeprom)
|
if (!adapter->prdeeprom)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memcpy(adapter->prdeeprom, ®ctrl, sizeof(regctrl));
|
memcpy(adapter->prdeeprom, ®ctrl, sizeof(regctrl));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче