projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'for-linus' into topic/hda-cleanup
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
gpu
/
drm
/
drm_buffer.c
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);