Takis patches

My patchdump

woensdag, maart 16, 2005

 

[patch 1/2] acpi: Toshiba failure handling


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;
}
_


Comments: Een reactie posten

<< Home

Archives

februari 2005   maart 2005  

This page is powered by Blogger. Isn't yours?