[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4D73BAE6.4000805@lwfinger.net>
Date: Sun, 06 Mar 2011 10:48:38 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: Xiaochen Wang <wangxiaochen0@...il.com>
CC: greg@...ah.com, florian.c.schilhabel@...glemail.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] check _malloc return value in rtl8712
On 03/06/2011 08:53 AM, Xiaochen Wang wrote:
> Description: The original check is wrong.
>
> Signed-off-by: Xiaochen Wang<wangxiaochen0@...il.com>
> ---
> 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 685a7b1..51fef02 100644
> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> @@ -953,7 +953,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);
ACK.
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists