From: "Panagiotis Issaris" Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver. Signed-off-by: Panagiotis Issaris Signed-off-by: Andrew Morton --- 25-akpm/drivers/acpi/toshiba_acpi.c | 3 +++ 1 files changed, 3 insertions(+) diff -puN drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling drivers/acpi/toshiba_acpi.c --- 25/drivers/acpi/toshiba_acpi.c~acpi-toshiba-failure-handling 2005-03-09 00:54:55.000000000 -0800 +++ 25-akpm/drivers/acpi/toshiba_acpi.c 2005-03-09 00:54:55.000000000 -0800 @@ -263,6 +263,9 @@ dispatch_write(struct file* file, const * 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; } _