From 18b85e98e10d9cea5c23b710e78c5f68897fb3a7 Mon Sep 17 00:00:00 2001 From: Aurabindo Pillai Date: Tue, 13 Sep 2022 16:21:09 -0400 Subject: drm/amd/display: fix a divide by zero error [Why&How] Incorrect variable was being checked for zero condition. Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c index 46ba6eee69ea..a2a70a1572b7 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c @@ -278,7 +278,7 @@ void dcn32_determine_det_override(struct dc *dc, } } - if (context->stream_count > 0) { + if (stream_count > 0) { stream_segments = 18 / stream_count; for (i = 0; i < context->stream_count; i++) { if (context->streams[i]->mall_stream_config.type == SUBVP_PHANTOM) -- cgit v1.2.3-70-g09d2