drm/amd/display: add a NULL pointer check
authorSung-huai Wang <danny.wang@amd.com>
Tue, 6 Jun 2023 06:28:38 +0000 (14:28 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Jun 2023 19:40:40 +0000 (15:40 -0400)
commit0f48a4b83610cb0e4e0bc487800ab69f51b4aca6
tree00cfda4acde2d68246d659cc05b788cdbcc3e0ee
parenta99a4ff6ef205d125002fc7e0857074e4e6597b6
drm/amd/display: add a NULL pointer check

[Why & How]

We have to check if stream is properly initialized before calling
find_matching_pll(), otherwise we might end up trying to deferecence a
NULL pointer.

Cc: stable@vger.kernel.org # 6.1+
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Sung-huai Wang <danny.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c