[PATCH 1/2] drm/amdgpu: release the VM shadow in the error path as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The series is Reviewed-by: Chunming Zhou <david1.zhou at amd.com>


On 2018å¹´02æ??03æ?¥ 04:17, Christian König wrote:
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 61cf93867b8e..b43098f02a40 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -411,6 +411,7 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
>   
>   			r = amdgpu_vm_clear_bo(adev, vm, pt, level, ats);
>   			if (r) {
> +				amdgpu_bo_unref(&pt->shadow);
>   				amdgpu_bo_unref(&pt);
>   				return r;
>   			}
> @@ -418,6 +419,7 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
>   			if (vm->use_cpu_for_update) {
>   				r = amdgpu_bo_kmap(pt, NULL);
>   				if (r) {
> +					amdgpu_bo_unref(&pt->shadow);
>   					amdgpu_bo_unref(&pt);
>   					return r;
>   				}



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux