Hello Nicholas Kazlauskas,

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

The patch 0f80e7cdc012: "drm/amd/display: Register DMUB service with 
DC" from Oct 28, 2019, leads to the following Smatch complaint:

    drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1049 
amdgpu_dm_fini()
     warn: variable dereferenced before check 'adev->dm.dc' (see line 1038)

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
  1029  #ifdef CONFIG_DRM_AMD_DC_HDCP
  1030          if (adev->dm.hdcp_workqueue) {
  1031                  hdcp_destroy(adev->dm.hdcp_workqueue);
  1032                  adev->dm.hdcp_workqueue = NULL;
  1033          }
  1034  
  1035          if (adev->dm.dc)
                    ^^^^^^^^^^^
Check

  1036                  dc_deinit_callbacks(adev->dm.dc);
  1037  #endif
  1038          if (adev->dm.dc->ctx->dmub_srv) {
                    ^^^^^^^^^^^^^^^^
Unchecked dereference

  1039                  dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
  1040                  adev->dm.dc->ctx->dmub_srv = NULL;
  1041          }
  1042  
  1043          if (adev->dm.dmub_bo)
  1044                  amdgpu_bo_free_kernel(&adev->dm.dmub_bo,
  1045                                        &adev->dm.dmub_bo_gpu_addr,
  1046                                        &adev->dm.dmub_bo_cpu_addr);
  1047  
  1048          /* DC Destroy TODO: Replace destroy DAL */
  1049          if (adev->dm.dc)
                    ^^^^^^^^^^^
Check

  1050                  dc_destroy(&adev->dm.dc);
  1051          /*

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

Reply via email to