projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83ea744
)
[ACPI] check for kmalloc failure in toshiba_acpi.c
author
Panagiotis Issaris
<takis@gna.org>
Thu, 31 Mar 2005 03:15:36 +0000
(22:15 -0500)
committer
Len Brown
<len.brown@intel.com>
Tue, 12 Jul 2005 03:57:35 +0000
(23:57 -0400)
Signed-off-by: Panagiotis Issaris <takis@gna.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/toshiba_acpi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/acpi/toshiba_acpi.c
b/drivers/acpi/toshiba_acpi.c
index bed8e53a5ee859006f85a670d1354c27139be39e..73b1d8aeae9d33ca1a69b82f6483d4cf39049a0f 100644
(file)
--- a/
drivers/acpi/toshiba_acpi.c
+++ b/
drivers/acpi/toshiba_acpi.c
@@
-263,6
+263,9
@@
dispatch_write(struct file* file, const char __user * buffer,
* destination so that sscanf can be used on it safely.
*/
tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
+ if(!tmp_buffer)
+ return -ENOMEM;
+
if (copy_from_user(tmp_buffer, buffer, count)) {
result = -EFAULT;
}