aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r--drivers/net/wireless/orinoco/wext.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c
index 5775124e2aee..a63108c6df7d 100644
--- a/drivers/net/wireless/orinoco/wext.c
+++ b/drivers/net/wireless/orinoco/wext.c
@@ -993,11 +993,9 @@ static int orinoco_ioctl_set_genie(struct net_device *dev,
993 return -EINVAL; 993 return -EINVAL;
994 994
995 if (wrqu->data.length) { 995 if (wrqu->data.length) {
996 buf = kmalloc(wrqu->data.length, GFP_KERNEL); 996 buf = kmemdup(extra, wrqu->data.length, GFP_KERNEL);
997 if (buf == NULL) 997 if (buf == NULL)
998 return -ENOMEM; 998 return -ENOMEM;
999
1000 memcpy(buf, extra, wrqu->data.length);
1001 } else 999 } else
1002 buf = NULL; 1000 buf = NULL;
1003 1001