]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle
authorColin Ian King <colin.king@canonical.com>
Wed, 24 Jun 2020 14:54:18 +0000 (15:54 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:26 +0000 (01:59 -0400)
commita71b63b1a6098e2da2fcd23ea404a95f4df64259
treea9355e492299ba9e56aa07f5e519710199ac91b6
parent531d5b28733a4273079c9fa917e1536b8c845635
drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle

In the cases where adev->jpeg.num_jpeg_inst is zero or the condition
adev->jpeg.harvest_config & (1 << i) is always non-zero the variable
ret is never set to an error condition and the function returns
an uninitialized value in ret.  Since the only exit condition at
the end if the function is a success then explicitly return
0 rather than a potentially uninitialized value in ret.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 93daf5c3bd43 ("drm/amdgpu: move JPEG2.5 out from VCN2.5")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c