[bug report] drm/amd/display: Various logs added

Dan Carpenter error27 at gmail.com
Mon Feb 27 07:12:07 UTC 2023


Hello Leo Chen,

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

The patch 7ef414375fcc: "drm/amd/display: Various logs added" from 
Aug 29, 2022, leads to the following Smatch complaint:

    ./drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c:1862 get_firmware_info_v3_2()
    warn: variable dereferenced before check 'smu_info_v3_2' (see line 1861)

./drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
  1860								DATA_TABLES(smu_info));
  1861			DC_LOG_BIOS("gpuclk_ss_percentage (unit of 0.001 percent): %d\n", smu_info_v3_2->gpuclk_ss_percentage);
                                                                                          ^^^^^^^^^^^^^^^
Log adds a crash.

  1862			if (!smu_info_v3_2)
                             ^^^^^^^^^^^^^
Too late.

  1863				return BP_RESULT_BADBIOSTABLE;
  1864	

regards,
dan carpenter


More information about the amd-gfx mailing list