Hi, Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver.
Signed-off-by: Panagiotis Issaris <[EMAIL PROTECTED]> diff -pruN linux-2.6.11-orig/drivers/acpi/toshiba_acpi.c linux-2.6.11-pi/drivers/acpi/toshiba_acpi.c --- linux-2.6.11-orig/drivers/acpi/toshiba_acpi.c 2005-03-05 01:04:40.000000000 +0100 +++ linux-2.6.11-pi/drivers/acpi/toshiba_acpi.c 2005-03-05 01:03:13.000000000 +0100 @@ -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; } -- K.U.Leuven, Mechanical Eng., Mechatronics & Robotics Research Group http://people.mech.kuleuven.ac.be/~pissaris/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/