[bug report] drm/amd/display: Fix allocate_mst_payload assert on resume

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

 



Hello Roman Li,

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

The patch c4af42b4eb5b: "drm/amd/display: Fix allocate_mst_payload
assert on resume" from Mar 17, 2022, leads to the following Smatch
complaint:

    drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2722 dm_resume()
    error: we previously assumed 'aconnector->dc_link' could be null (see line 2717)

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
  2716			 */
  2717			if (aconnector->dc_link &&
                            ^^^^^^^^^^^^^^^^^^^
Patch adds a check for NULL

  2718			    aconnector->dc_link->type == dc_connection_mst_branch)
  2719				continue;
  2720	
  2721			mutex_lock(&aconnector->hpd_lock);
  2722			if (!dc_link_detect_sink(aconnector->dc_link, &new_connection_type))
                                                 ^^^^^^^^^^^^^^^^^^^
If aconnector->dc_link is NULL this will crash inside the function call.

  2723				DRM_ERROR("KMS: Failed to detect connector\n");
  2724	

regards,
dan carpenter



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

  Powered by Linux