summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-08-06 07:27:48 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-23 15:16:35 -0700
commit5ae717139a6defae9656f743dff8388aeb94df93 (patch)
tree7f210a086782c4b2d00a288eda126e7e946665dd /drivers/staging/rtl8712
parent733e3ef0d364b7e6757a897e7f1862a70c89305a (diff)
rtl8712: don't just return -EFAULT in wpa_supplicant_ioctl()
There were some curly braces missing so the original code in wpa_supplicant_ioctl() pretty much always returned -EFAULT without doing anything. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r--drivers/staging/rtl8712/rtl871x_ioctl_linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 59bdab105334..d310a6174b97 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -2089,9 +2089,10 @@ static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p)
param = (struct ieee_param *)_malloc(p->length);
if (param == NULL)
return -ENOMEM;
- if (copy_from_user(param, p->pointer, p->length))
+ if (copy_from_user(param, p->pointer, p->length)) {
kfree((u8 *)param);
return -EFAULT;
+ }
switch (param->cmd) {
case IEEE_CMD_SET_WPA_PARAM:
ret = wpa_set_param(dev, param->u.wpa_param.name,