projects
/
GitHub
/
LineageOS
/
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:
069a9dc
)
drm: drm_debugfs, check kmalloc retval
author
Jiri Slaby
<jirislaby@gmail.com>
Mon, 13 Jul 2009 21:20:20 +0000
(23:20 +0200)
committer
Dave Airlie
<airlied@linux.ie>
Wed, 15 Jul 2009 05:55:37 +0000
(15:55 +1000)
Check kmalloc return value in drm_debugfs_create_files and bail out
appropriately if the pointer is NULL.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/drm_debugfs.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/drm_debugfs.c
b/drivers/gpu/drm/drm_debugfs.c
index 2960b6d73456d65b672ad4a7b715976113002859..9903f270e4409c8239add50adc2a3db80ca56623 100644
(file)
--- a/
drivers/gpu/drm/drm_debugfs.c
+++ b/
drivers/gpu/drm/drm_debugfs.c
@@
-101,6
+101,10
@@
int drm_debugfs_create_files(struct drm_info_list *files, int count,
continue;
tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
+ if (tmp == NULL) {
+ ret = -1;
+ goto fail;
+ }
ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
root, tmp, &drm_debugfs_fops);
if (!ent) {