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 'linux-linaro-lsk' into linux-linaro-lsk-android
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
misc
/
lkdtm.c
diff --git
a/drivers/misc/lkdtm.c
b/drivers/misc/lkdtm.c
index 28adefe70f96274c93198ee50acc9ee65adec1ae..08aad69c8da4e3f4d8572d52eadd46c00bb65941 100644
(file)
--- a/
drivers/misc/lkdtm.c
+++ b/
drivers/misc/lkdtm.c
@@
-477,6
+477,8
@@
static ssize_t lkdtm_debugfs_read(struct file *f, char __user *user_buf,
int i, n, out;
buf = (char *)__get_free_page(GFP_KERNEL);
int i, n, out;
buf = (char *)__get_free_page(GFP_KERNEL);
+ if (buf == NULL)
+ return -ENOMEM;
n = snprintf(buf, PAGE_SIZE, "Available crash types:\n");
for (i = 0; i < ARRAY_SIZE(cp_type); i++)
n = snprintf(buf, PAGE_SIZE, "Available crash types:\n");
for (i = 0; i < ARRAY_SIZE(cp_type); i++)