aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-01-31 07:57:39 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-03-13 11:52:35 -0400
commit9543a9c3e2359db4b9576ee2ae3bae5a28e08387 (patch)
tree04b4d01fa15a3339bec2a81b4e41fcf5603dc02f /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
parent95f247e73f8dd4d3f586b410d07df791ca3b2fef (diff)
drm/amd/display: Possible divide by zero in set_speed()
If "speed" is zero then we use it as a divisor to find "prescale". It's better to move the check for zero to the very start of the function. Fixes: 9eeec26a1339 ("drm/amd/display: Refine i2c frequency calculating sequence") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c')
0 files changed, 0 insertions, 0 deletions