summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712
diff options
context:
space:
mode:
authorXiaochen Wang <wangxiaochen0@gmail.com>2011-03-06 22:53:21 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-07 13:46:38 -0800
commit4495c15f29a11c41d0a69a6e848307b0db7cc196 (patch)
tree5cb74c6fbb4212fb8142215e45e92d35fb9e2cee /drivers/staging/rtl8712
parentcd92274093876c57fa4de0f219a552911ef9adc6 (diff)
staging: rtl8712: check _malloc return value
Description: The original check is wrong. Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r--drivers/staging/rtl8712/rtl871x_ioctl_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 4ac17c0bbd59..8ebfdd620ba4 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -958,7 +958,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
len = dwrq->length;
ext = _malloc(len);
- if (!_malloc(len))
+ if (!ext)
return -ENOMEM;
if (copy_from_user(ext, dwrq->pointer, len)) {
kfree(ext);