public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <bskeggs@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>,
	kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Martin Peres <martin.peres@ensi-bourges.fr>,
	Roy Spliet <r.spliet@student.tudelft.nl>
Subject: Re: [patch] drm/nouveau: testing the wrong variable
Date: Tue, 18 Oct 2011 06:20:48 +0000	[thread overview]
Message-ID: <1318918848.2567.0.camel@nisroch> (raw)
In-Reply-To: <20111018060751.GB27732@elgon.mountain>

On Tue, 2011-10-18 at 09:07 +0300, Dan Carpenter wrote:
> memtimings is a valid pointer here, the intent was to test for
> kcalloc() failure.
I've queued it, thanks!

Ben.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c
> index 9f178aa..33d03fb 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_perf.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_perf.c
> @@ -239,7 +239,7 @@ nouveau_perf_init(struct drm_device *dev)
>  	if(version = 0x15) {
>  		memtimings->timing >  				kcalloc(entries, sizeof(*memtimings->timing), GFP_KERNEL);
> -		if(!memtimings) {
> +		if (!memtimings->timing) {
>  			NV_WARN(dev,"Could not allocate memtiming table\n");
>  			return;
>  		}



      reply	other threads:[~2011-10-18  6:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18  6:07 [patch] drm/nouveau: testing the wrong variable Dan Carpenter
2011-10-18  6:20 ` Ben Skeggs [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=1318918848.2567.0.camel@nisroch \
    --to=bskeggs@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=martin.peres@ensi-bourges.fr \
    --cc=r.spliet@student.tudelft.nl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox