All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/display: Register DMUB service with DC
@ 2019-11-13 18:32 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2019-11-13 18:32 UTC (permalink / raw)
  To: nicholas.kazlauskas-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [bug report] drm/amd/display: Register DMUB service with DC
@ 2019-11-13 18:32 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2019-11-13 18:32 UTC (permalink / raw)
  To: nicholas.kazlauskas; +Cc: amd-gfx

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-13 18:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 18:32 [bug report] drm/amd/display: Register DMUB service with DC Dan Carpenter
2019-11-13 18:32 ` 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.