dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* re: drm/ttm: callback move_notify any time bo placement
@ 2011-12-07  9:02 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-12-07  9:02 UTC (permalink / raw)
  To: jglisse; +Cc: dri-devel

change v4

Hello Jerome Glisse,

This is a semi-automatic email about new static checker warnings.

The patch dc97b3409a79: "drm/ttm: callback move_notify any time bo 
placement change v4" from Nov 18, 2011, leads to the following Smatch 
complaint:

drivers/gpu/drm/nouveau/nouveau_bo.c +818 nouveau_bo_move_ntfy()
	 warn: variable dereferenced before check 'new_mem' (see line 813)

drivers/gpu/drm/nouveau/nouveau_bo.c
   812	{
   813		struct nouveau_mem *node = new_mem->mm_node;
                                           ^^^^^^^^^^^^^^^^
Old dereference.  new_mem can be NULL here these days.

   814		struct nouveau_bo *nvbo = nouveau_bo(bo);
   815		struct nouveau_vma *vma;
   816	
   817		list_for_each_entry(vma, &nvbo->vma_list, head) {
   818			if (new_mem && new_mem->mem_type == TTM_PL_VRAM) {
                            ^^^^^^^
new check.

   819				nouveau_vm_map(vma, new_mem->mm_node);
   820			} else

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-07  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07  9:02 drm/ttm: callback move_notify any time bo placement Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox