[bug report] drm/amd/display: Implement interface for CRC on CRTC

Dan Carpenter dan.carpenter at oracle.com
Fri Mar 2 10:51:32 UTC 2018


Hello Leo (Sunpeng) Li,

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

The patch 31aec354f92c: "drm/amd/display: Implement interface for CRC 
on CRTC" from Dec 18, 2017, leads to the following Smatch complaint:

    drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:323 dm_crtc_high_irq()
    error: we previously assumed 'acrtc' could be null (see line 319)

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
   318	
   319		if (acrtc)
                    ^^^^^
Old code checked for NULL

   320			crtc_index = acrtc->crtc_id;
   321	
   322		drm_handle_vblank(adev->ddev, crtc_index);
   323		amdgpu_dm_crtc_handle_crc_irq(&acrtc->base);
                                               ^^^^^^^^^^^
The new code dereferences without checking (inside the function call).

   324	}
   325	

regards,
dan carpenter


More information about the amd-gfx mailing list