diff options
author | Christian König <christian.koenig@amd.com> | 2022-09-20 15:13:33 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-09-20 19:41:08 +0300 |
commit | b091fc6f8e5bb27577ffb71087f06730f33a8908 (patch) | |
tree | 980e97376c9f6605c9d1ee944858e303adf967e5 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | 0b844b6ee28cb99ca387880435044cb55a51d73d (diff) | |
download | linux-b091fc6f8e5bb27577ffb71087f06730f33a8908.tar.xz |
drm/amdgpu: properly initialize return value during CS
The return value is no longer initialized before the loop because of
moving code around.
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: c2b08e7a6d27 ("drm/amdgpu: move entity selection and job init earlier during CS")
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index a26e769946b7..1bbd39b3b0fc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1260,6 +1260,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, /* If userptr are invalidated after amdgpu_cs_parser_bos(), return * -EAGAIN, drmIoctl in libdrm will restart the amdgpu_cs_ioctl. */ + r = 0; amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) { struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo); |