diff options
author | Junwei Zhang <Jerry.Zhang@amd.com> | 2018-06-26 11:23:48 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-07-10 22:16:06 +0300 |
commit | dc407ee0bda07e1e992ed7c93c1faef13a1125bd (patch) | |
tree | 99dd3d2d7ecde31287de803f64d4be84f4ec0fcc /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | bb812f1ea87dd7a4f336242212219268393ed308 (diff) | |
download | linux-dc407ee0bda07e1e992ed7c93c1faef13a1125bd.tar.xz |
drm/amdgpu: fix kmap error handling for bo creations
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 7f7c2212aedd..9ee678d63890 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -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; } } |