Commit bf727263 authored by Tony Cheng's avatar Tony Cheng Committed by Alex Deucher

drm/amd/display: assert if mask is 0 in set_reg_field_value_ex

-  mask = 0 means something is wrong in caller and no register field will be updated
Signed-off-by: default avatarTony Cheng <tony.cheng@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f84a8161
......@@ -165,6 +165,7 @@ static inline uint32_t set_reg_field_value_ex(
uint32_t mask,
uint8_t shift)
{
ASSERT(mask != 0);
return (reg_value & ~mask) | (mask & (value << shift));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment