diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3580-drm-amdgpu_gem-fix-error-handling-path-in-amdgpu_gem.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3580-drm-amdgpu_gem-fix-error-handling-path-in-amdgpu_gem.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3580-drm-amdgpu_gem-fix-error-handling-path-in-amdgpu_gem.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3580-drm-amdgpu_gem-fix-error-handling-path-in-amdgpu_gem.patch new file mode 100644 index 00000000..e5de0176 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3580-drm-amdgpu_gem-fix-error-handling-path-in-amdgpu_gem.patch @@ -0,0 +1,48 @@ +From 9a383051b57ea6ef073d6e248d445b031ff38b6a Mon Sep 17 00:00:00 2001 +From: "Gustavo A. R. Silva" <gustavo@embeddedor.com> +Date: Wed, 14 Feb 2018 23:20:00 -0600 +Subject: [PATCH 3580/4131] drm/amdgpu_gem: fix error handling path in + amdgpu_gem_va_update_vm +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Currently, if amdgpu_vm_bo_update() fails, the returned error +is being ignored. + +Fix this by properly checking _r_ after calling amdgpu_vm_bo_update. +Also, remove redundant code just before label _error_. + +Addresses-Coverity-ID: 1464280 ("Unused value") +Fixes: 0abc6878fc2d ("drm/amdgpu: update VM PDs after the PTs") +Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> +Reviewed-by: Christian König <christian.koenig@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +index 8497e48..586a77b 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +@@ -694,12 +694,13 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, + goto error; + + if (operation == AMDGPU_VA_OP_MAP || +- operation == AMDGPU_VA_OP_REPLACE) ++ operation == AMDGPU_VA_OP_REPLACE) { + r = amdgpu_vm_bo_update(adev, bo_va, false); ++ if (r) ++ goto error; ++ } + + r = amdgpu_vm_update_directories(adev, vm); +- if (r) +- goto error; + + error: + if (r && r != -ERESTARTSYS) +-- +2.7.4 + |