[bug report] drm/amd/display: Add ABM driver implementation

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

 



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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux