Loading
drm/amd/display: fix mixed declarations warning
hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAU9N4 CVE: CVE-2024-46802 -------------------------------- The previous commit introduce a compile warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c: In function ‘dc_validate_stream’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:2920:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] struct dc_link *link = stream->link; ^~~~~~ Fix this by moving those declarations before code. Fixes: d61f7961de27 ("drm/amd/display: added NULL check at start of dc_validate_stream") Signed-off-by:Yu Liao <liaoyu15@huawei.com>