diff options
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 428a9be..76374b2 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -1122,8 +1122,7 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, kfree(hw->scanresults); - hw->scanresults = kmalloc(sizeof(hfa384x_InfFrame_t), GFP_ATOMIC); - memcpy(hw->scanresults, inf, sizeof(hfa384x_InfFrame_t)); + hw->scanresults = kmemdup(inf, sizeof(hfa384x_InfFrame_t), GFP_ATOMIC); if (nbss == 0) nbss = -1; |