]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Check pipe_ctx before it is used
authorAlex Hung <alex.hung@amd.com>
Mon, 3 Jun 2024 20:27:55 +0000 (14:27 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Jun 2024 16:44:47 +0000 (12:44 -0400)
commit7cf24de30e8ab875abc92a81ff227ab9e5f4282e
tree96efc22fe3b735ceaa0e09be729517b3a1464357
parent470f3760cfe6dd2ce66cf9159e65876f7eb28792
drm/amd/display: Check pipe_ctx before it is used

resource_get_odm_slice_count and resource_get_otg_master_for_stream can
return null, and their returns must be checked before used.

This fixes 4 NULL_RETURNS issues reported by Coverity.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_utils.c
drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c