OSDN Git Service

drm/amdgpu: fix kmap error handling for bo creations
authorJunwei Zhang <Jerry.Zhang@amd.com>
Tue, 26 Jun 2018 08:23:48 +0000 (16:23 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Jul 2018 19:16:06 +0000 (14:16 -0500)
kmap happens after bo pin, so unpin is required on error

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.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_object.c

index 7f7c221..9ee678d 100644 (file)
@@ -271,7 +271,7 @@ int amdgpu_bo_create_reserved(struct amdgpu_device *adev,
                r = amdgpu_bo_kmap(*bo_ptr, cpu_addr);
                if (r) {
                        dev_err(adev->dev, "(%d) kernel bo map failed\n", r);
-                       goto error_unreserve;
+                       goto error_unpin;
                }
        }