Skip to content

Commit

Permalink
rtl8712: don't just return -EFAULT in wpa_supplicant_ioctl()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 733e3ef commit 5ae7171
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/rtl8712/rtl871x_ioctl_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5ae7171

Please sign in to comment.