Skip to content

Commit e3a95f2

Browse files
Alex Hunggregkh
authored andcommitted
drm/amd/display: Skip wbscl_set_scaler_filter if filter is null
[ Upstream commit c4d3165 ] Callers can pass null in filter (i.e. from returned from the function wbscl_get_filter_coeffs_16p) and a null check is added to ensure that is not the case. 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent e50bec6 commit e3a95f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ static void wbscl_set_scaler_filter(
690690
int pair;
691691
uint16_t odd_coef, even_coef;
692692

693+
if (!filter)
694+
return;
695+
693696
for (phase = 0; phase < (NUM_PHASES / 2 + 1); phase++) {
694697
for (pair = 0; pair < tap_pairs; pair++) {
695698
even_coef = filter[phase * taps + 2 * pair];

0 commit comments

Comments
 (0)