drm/radeon: fix a possible null pointer dereference
In radeon_fp_native_mode(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. The failure status of drm_cvt_mode() on the other path is checked too. Signed-off-by: NGong Yuanjun <ruc_gongyuanjun@163.com> Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Showing
想要评论请 注册 或 登录