提交 cd2d6c92 编写于 作者: S Shirish S 提交者: Alex Deucher

drm/amd/display: fix dereferencing possible ERR_PTR()

This patch fixes static checker warning caused by
"36cc549d: "drm/amd/display: disable CRTCs with
NULL FB on their primary plane (V2)"
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NShirish S <shirish.s@amd.com>
Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
Acked-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 219be9dd
......@@ -4794,6 +4794,9 @@ static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state,
return -EDEADLK;
crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
if (crtc->primary == plane && crtc_state->active) {
if (!plane_state->fb)
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册