aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/toshiba_acpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index bed8e53a5ee8..73b1d8aeae9d 100644
--- 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,
263 * destination so that sscanf can be used on it safely. 263 * destination so that sscanf can be used on it safely.
264 */ 264 */
265 tmp_buffer = kmalloc(count + 1, GFP_KERNEL); 265 tmp_buffer = kmalloc(count + 1, GFP_KERNEL);
266 if(!tmp_buffer)
267 return -ENOMEM;
268
266 if (copy_from_user(tmp_buffer, buffer, count)) { 269 if (copy_from_user(tmp_buffer, buffer, count)) {
267 result = -EFAULT; 270 result = -EFAULT;
268 } 271 }