mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/amd/display: Initialize denominator defaults to 1
[WHAT & HOW] Variables, used as denominators and maybe not assigned to other values, should be initialized to non-zero to avoid DIVIDE_BY_ZERO, as reported by Coverity. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
44cea2bb9c
commit
e2c4c6c105
1 changed files with 2 additions and 2 deletions
|
@ -600,8 +600,8 @@ static void CalculateBytePerPixelAndBlockSizes(
|
|||
{
|
||||
*BytePerPixelDETY = 0;
|
||||
*BytePerPixelDETC = 0;
|
||||
*BytePerPixelY = 0;
|
||||
*BytePerPixelC = 0;
|
||||
*BytePerPixelY = 1;
|
||||
*BytePerPixelC = 1;
|
||||
|
||||
if (SourcePixelFormat == dml2_444_64) {
|
||||
*BytePerPixelDETY = 8;
|
||||
|
|
Loading…
Add table
Reference in a new issue