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:
parent
bb812f1ea8
commit
dc407ee0bd
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue