Re: [patch] drm/nouveau: testing the wrong variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> 
> 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;
>  		}


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux