]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
net: bgmac: Fix return value check for fixed_phy_register()
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_cs.c
index b34f9f8d33d2179a4a33c39b4ee977d9b0f21141..fb78a8f4758792498e5c3d8fe69543c86afcfa11 100644 (file)
@@ -295,7 +295,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
 
        if (!p->gang_size) {
                ret = -EINVAL;
-               goto free_partial_kdata;
+               goto free_all_kdata;
        }
 
        for (i = 0; i < p->gang_size; ++i) {
@@ -1654,15 +1654,15 @@ static int amdgpu_cs_wait_all_fences(struct amdgpu_device *adev,
                        continue;
 
                r = dma_fence_wait_timeout(fence, true, timeout);
+               if (r > 0 && fence->error)
+                       r = fence->error;
+
                dma_fence_put(fence);
                if (r < 0)
                        return r;
 
                if (r == 0)
                        break;
-
-               if (fence->error)
-                       return fence->error;
        }
 
        memset(wait, 0, sizeof(*wait));
This page took 0.036586 seconds and 4 git commands to generate.