projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b2de69
)
drm/amdgpu: don't allocate zero sized kernel BOs
author
Christian König
<
[email protected]
>
Fri, 14 Sep 2018 19:03:37 +0000
(21:03 +0200)
committer
Alex Deucher
<
[email protected]
>
Wed, 19 Sep 2018 17:36:50 +0000
(12:36 -0500)
Just free the BO if the size should be zero.
Signed-off-by: Christian König <
[email protected]
>
Reviewed-by: Alex Deucher <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index e6909252aefabec5594cc92eaa2cc7f5acade34e..84d82d5382f95b39934c94dd37098bc9075afa13 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@
-250,6
+250,11
@@
int amdgpu_bo_create_reserved(struct amdgpu_device *adev,
bool free = false;
int r;
+ if (!size) {
+ amdgpu_bo_unref(bo_ptr);
+ return 0;
+ }
+
memset(&bp, 0, sizeof(bp));
bp.size = size;
bp.byte_align = align;