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>
This commit is contained in:
Junwei Zhang 2018-06-26 16:23:48 +08:00 committed by Alex Deucher
parent bb812f1ea8
commit dc407ee0bd
1 changed files with 1 additions and 1 deletions

View 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;
}
}