All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Xiaochen Wang <wangxiaochen0@gmail.com>
Cc: greg@kroah.com, florian.c.schilhabel@googlemail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] check _malloc return value in rtl8712
Date: Sun, 06 Mar 2011 10:48:38 -0600	[thread overview]
Message-ID: <4D73BAE6.4000805@lwfinger.net> (raw)
In-Reply-To: <20110306145321.GA20485@chii>

On 03/06/2011 08:53 AM, Xiaochen Wang wrote:
> Description: The original check is wrong.
>
> Signed-off-by: Xiaochen Wang<wangxiaochen0@gmail.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


      reply	other threads:[~2011-03-06 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-06 14:53 [PATCH] check _malloc return value in rtl8712 Xiaochen Wang
2011-03-06 16:48 ` Larry Finger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D73BAE6.4000805@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangxiaochen0@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.