[PATCH] drm/amd/amdgpu: Avoid fault when allocating an empty buffer object

Christian König ckoenig.leichtzumerken at gmail.com
Mon Sep 17 18:08:59 UTC 2018


Am 17.09.2018 um 20:07 schrieb Tom St Denis:
> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

You was faster than me :)

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 84d82d5382f9..c1387efc0c91 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -348,7 +348,8 @@ int amdgpu_bo_create_kernel(struct amdgpu_device *adev,
>   	if (r)
>   		return r;
>   
> -	amdgpu_bo_unreserve(*bo_ptr);
> +	if (*bo_ptr)
> +		amdgpu_bo_unreserve(*bo_ptr);
>   
>   	return 0;
>   }



More information about the amd-gfx mailing list