Toshiba ACPI failure handling
PATCH 1/1 Toshiba ACPI failure handling
Hi,
Adds the missing failure handling for a kmalloc in the Toshiba ACPI driver.
Signed-off-by Panagiotis Issaris <[email protected]>
drivers/acpi/toshiba_acpi.c +3 -0
@@ -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 ; }
Signature · 2 lines
K.U.Leuven, Mechanical Eng., Mechatronics & Robotics Research Group http://people.mech.kuleuven.ac.be/~pissaris/