mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
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>
This commit is contained in:
parent
733e3ef0d3
commit
5ae717139a
1 changed files with 2 additions and 1 deletions
|
@ -2089,9 +2089,10 @@ static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p)
|
||||||
param = (struct ieee_param *)_malloc(p->length);
|
param = (struct ieee_param *)_malloc(p->length);
|
||||||
if (param == NULL)
|
if (param == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
if (copy_from_user(param, p->pointer, p->length))
|
if (copy_from_user(param, p->pointer, p->length)) {
|
||||||
kfree((u8 *)param);
|
kfree((u8 *)param);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
}
|
||||||
switch (param->cmd) {
|
switch (param->cmd) {
|
||||||
case IEEE_CMD_SET_WPA_PARAM:
|
case IEEE_CMD_SET_WPA_PARAM:
|
||||||
ret = wpa_set_param(dev, param->u.wpa_param.name,
|
ret = wpa_set_param(dev, param->u.wpa_param.name,
|
||||||
|
|
Loading…
Reference in a new issue