projects
/
kernel
/
kernel-generic.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
|
history
diff --git
a/drivers/acpi/toshiba_acpi.c
b/drivers/acpi/toshiba_acpi.c
index
bed8e53
..
73b1d8a
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;
}