From: Dan Carpenter Subject: re: drm/nouveau/fence: convert to exec engine, and improve channel sync Date: Wed, 26 Sep 2012 11:01:22 +0300 Message-ID: <20120926080122.GA5306@elgon.mountain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by gabe.freedesktop.org (Postfix) with ESMTP id 60A42A0E2F for ; Wed, 26 Sep 2012 01:01:32 -0700 (PDT) Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: bskeggs@redhat.com Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hello Ben Skeggs, This is a semi-automatic email about new static checker warnings. I'm not sure why I didn't send this when the code was first submitted. The patch 5e120f6e4b3f: "drm/nouveau/fence: convert to exec engine, and improve channel sync" from Apr 30, 2012, leads to the following Smatch complaint: drivers/gpu/drm/nouveau/nouveau_fence.c:204 nouveau_fence_new() warn: variable dereferenced before check 'chan' (see line 196) drivers/gpu/drm/nouveau/nouveau_fence.c 195 196 if (unlikely(!chan->engctx[NVOBJ_ENGINE_FENCE])) ^^^^^^^^^^^^ New dereference. 197 return -ENODEV; 198 199 fence = kzalloc(sizeof(*fence), GFP_KERNEL); 200 if (!fence) 201 return -ENOMEM; 202 kref_init(&fence->kref); 203 204 if (chan) { ^^^^^^ Old check. 205 ret = nouveau_fence_emit(fence, chan); 206 if (ret) regards, dan carpenter See also: