diff options
author | Tom Rix <trix@redhat.com> | 2022-02-10 20:04:18 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-02-12 00:11:33 +0300 |
commit | d8a25e48585773afc573e835a52f9cbf409215bc (patch) | |
tree | a3ccb358c2daeb006fd5af6196c2f63646c765db /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | fd22013a098baca78679656d55f8fd0becb99a8d (diff) | |
download | linux-d8a25e48585773afc573e835a52f9cbf409215bc.tar.xz |
drm/amdkfd: fix loop error handling
Clang static analysis reports this problem
kfd_chardev.c:2594:16: warning: The expression is an uninitialized value.
The computed value will also be garbage
while (ret && i--) {
^~~
i is a loop variable and this block unwinds a problem in the loop.
When the error happens before the loop, this value is garbage.
Move the initialization of i to its decalaration.
Fixes: be072b06c739 ("drm/amdkfd: CRIU export BOs as prime dmabuf objects")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions