summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@gna.org>2005-03-30 22:15:36 -0500
committerLen Brown <len.brown@intel.com>2005-07-11 23:57:35 -0400
commitf4224153098c1103db592b28f304beeb9c02481b (patch)
treefa95a72d6554d68f412c58e3ff59a663d275186a /drivers
parent83ea7445221651dc43cf8d22f81089e0cbccf22b (diff)
downloadop-kernel-dev-f4224153098c1103db592b28f304beeb9c02481b.zip
op-kernel-dev-f4224153098c1103db592b28f304beeb9c02481b.tar.gz
[ACPI] check for kmalloc failure in toshiba_acpi.c
Signed-off-by: Panagiotis Issaris <takis@gna.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/toshiba_acpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index bed8e53..73b1d8a 100644
--- a/drivers/acpi/toshiba_acpi.c
+++ b/drivers/acpi/toshiba_acpi.c
@@ -263,6 +263,9 @@ dispatch_write(struct file* file, const char __user * buffer,
* 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;
}
OpenPOWER on IntegriCloud