diff options
author | Xiaochen Wang <wangxiaochen0@gmail.com> | 2011-03-06 22:53:21 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-07 13:46:38 -0800 |
commit | 4495c15f29a11c41d0a69a6e848307b0db7cc196 (patch) | |
tree | 5cb74c6fbb4212fb8142215e45e92d35fb9e2cee /drivers/staging/rtl8712 | |
parent | cd92274093876c57fa4de0f219a552911ef9adc6 (diff) | |
download | linux-3.10-4495c15f29a11c41d0a69a6e848307b0db7cc196.tar.gz linux-3.10-4495c15f29a11c41d0a69a6e848307b0db7cc196.tar.bz2 linux-3.10-4495c15f29a11c41d0a69a6e848307b0db7cc196.zip |
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.c | 2 |
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 4ac17c0bbd5..8ebfdd620ba 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); |