diff options
| author | Tom St Denis <[email protected]> | 2018-09-17 18:07:00 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2018-09-19 17:37:04 +0000 |
| commit | ddaf501347e21a19d15977029af1d229cd800379 (patch) | |
| tree | 56069bd3e9594fbf1de4ca73185eaa0f9817386f /drivers/gpu/drm/amd/amdgpu | |
| parent | drm/amdgpu: drop size check (diff) | |
| download | kernel-ddaf501347e21a19d15977029af1d229cd800379.tar.gz kernel-ddaf501347e21a19d15977029af1d229cd800379.zip | |
drm/amd/amdgpu: Avoid fault when allocating an empty buffer object
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |
