projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2aa9d2b
)
drivers/gpu/drm/drm_buffer.c: remove unnecessary null test before kfree
author
Fabian Frederick
<fabf@skynet.be>
Sat, 28 Jun 2014 13:20:43 +0000
(15:20 +0200)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Fri, 18 Jul 2014 13:39:27 +0000
(15:39 +0200)
This patch removes special case of last element and loops from idx to 0.
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_buffer.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/drm_buffer.c
b/drivers/gpu/drm/drm_buffer.c
index 0406110f83edd2ac3f607fe575c8e7b6c491e88a..86a4a4a60afcd79a052856275690ac088a4ff7c2 100644
(file)
--- a/
drivers/gpu/drm/drm_buffer.c
+++ b/
drivers/gpu/drm/drm_buffer.c
@@
-80,11
+80,7
@@
int drm_buffer_alloc(struct drm_buffer **buf, int size)
error_out:
- /* Only last element can be null pointer so check for it first. */
- if ((*buf)->data[idx])
- kfree((*buf)->data[idx]);
-
- for (--idx; idx >= 0; --idx)
+ for (; idx >= 0; --idx)
kfree((*buf)->data[idx]);
kfree(*buf);