From: Dan Carpenter Date: Sat, 6 Aug 2011 14:27:48 +0000 (-0700) Subject: rtl8712: don't just return -EFAULT in wpa_supplicant_ioctl() X-Git-Tag: MMI-PSA29.97-13-9~18234^2^2~864^2~166 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ae717139a6defae9656f743dff8388aeb94df93;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Greg Kroah-Hartman --- 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,