diff options
-rw-r--r-- | drivers/net/tulip/de2104x.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index f6b3a94e97bf..9d67f11422ec 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -1906,9 +1906,7 @@ fill_defaults: | |||
1906 | de->media[i].csr15 = t21041_csr15[i]; | 1906 | de->media[i].csr15 = t21041_csr15[i]; |
1907 | } | 1907 | } |
1908 | 1908 | ||
1909 | de->ee_data = kmalloc(DE_EEPROM_SIZE, GFP_KERNEL); | 1909 | de->ee_data = kmemdup(&ee_data[0], DE_EEPROM_SIZE, GFP_KERNEL); |
1910 | if (de->ee_data) | ||
1911 | memcpy(de->ee_data, &ee_data[0], DE_EEPROM_SIZE); | ||
1912 | 1910 | ||
1913 | return; | 1911 | return; |
1914 | 1912 | ||
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 4e4eaa2a99ca..5bf4d4119c3d 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -7568,11 +7568,10 @@ static int ipw2100_wx_set_genie(struct net_device *dev, | |||
7568 | return -EINVAL; | 7568 | return -EINVAL; |
7569 | 7569 | ||
7570 | if (wrqu->data.length) { | 7570 | if (wrqu->data.length) { |
7571 | buf = kmalloc(wrqu->data.length, GFP_KERNEL); | 7571 | buf = kmemdup(extra, wrqu->data.length, GFP_KERNEL); |
7572 | if (buf == NULL) | 7572 | if (buf == NULL) |
7573 | return -ENOMEM; | 7573 | return -ENOMEM; |
7574 | 7574 | ||
7575 | memcpy(buf, extra, wrqu->data.length); | ||
7576 | kfree(ieee->wpa_ie); | 7575 | kfree(ieee->wpa_ie); |
7577 | ieee->wpa_ie = buf; | 7576 | ieee->wpa_ie = buf; |
7578 | ieee->wpa_ie_len = wrqu->data.length; | 7577 | ieee->wpa_ie_len = wrqu->data.length; |