]> err.no Git - linux-2.6/blobdiff - drivers/acpi/toshiba_acpi.c
[PATCH] 3c59x: read current link status from phy
[linux-2.6] / drivers / acpi / toshiba_acpi.c
index bed8e53a5ee859006f85a670d1354c27139be39e..73b1d8aeae9d33ca1a69b82f6483d4cf39049a0f 100644 (file)
@@ -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;
        }