All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/display: Add ABM driver implementation
@ 2020-04-06 11:43 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-04-06 11:43 UTC (permalink / raw)
  To: wyatt.wood; +Cc: amd-gfx

Hello Wyatt Wood,

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

The patch 16012806e697: "drm/amd/display: Add ABM driver
implementation" from Feb 20, 2020, leads to the following Smatch
complaint:

    drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c:661 dmcu_load_iram()
    warn: variable dereferenced before check 'dmcu' (see line 659)

drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c
   658		bool result = false;
   659		struct abm *abm = dmcu->ctx->dc->res_pool->abm;
                                  ^^^^^^
The patch adds a dereference

   660	
   661		if (dmcu == NULL && abm == NULL)
                    ^^^^^^^^^^^^

   662			return false;
   663	
   664          if (dmcu && !dmcu->funcs->is_dmcu_initialized(dmcu))
                    ^^^^
And it also adds NULL checking on dmcu.

   665                  return true;
   666  
   667          memset(&ram_table, 0, sizeof(ram_table));
   668  

regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

only message in thread, other threads:[~2020-04-06 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 11:43 [bug report] drm/amd/display: Add ABM driver implementation Dan Carpenter

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.