Skip to content

Commit 57f0185

Browse files
Colin Ian Kingalexdeucher
authored andcommitted
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: 14f43e8 ("drm/amdgpu: move JPEG2.5 out from VCN2.5") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6a8987a commit 57f0185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ static int jpeg_v2_5_wait_for_idle(void *handle)
462462
return ret;
463463
}
464464

465-
return ret;
465+
return 0;
466466
}
467467

468468
static int jpeg_v2_5_set_clockgating_state(void *handle,

0 commit comments

Comments
 (0)