[bug report] drm/amd/display: Add ABM driver implementation
Dan Carpenter
dan.carpenter at oracle.com
Mon Apr 6 11:43:43 UTC 2020
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
More information about the amd-gfx
mailing list