Messages in this thread Patch in this message | | | From | "Panagiotis Issaris" <> | Date | Sat, 5 Mar 2005 01:18:16 +0100 | Subject | [PATCH] Toshiba ACPI failure handling |
| |
Hi,
Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver.
Signed-off-by: Panagiotis Issaris <takis@gna.org>
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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |