mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
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>
This commit is contained in:
@@ -1177,6 +1177,9 @@ static void init_pipe_slice_table_from_context(
|
||||
stream = context->streams[i];
|
||||
otg_master = resource_get_otg_master_for_stream(
|
||||
&context->res_ctx, stream);
|
||||
if (!otg_master)
|
||||
continue;
|
||||
|
||||
count = resource_get_odm_slice_count(otg_master);
|
||||
update_slice_table_for_stream(table, stream, count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user