]> err.no Git - linux-2.6/blobdiff - drivers/acpi/toshiba_acpi.c
[PATCH] jffs/jffs2: remove wrong function prototypes
[linux-2.6] / drivers / acpi / toshiba_acpi.c
index c84997c9f9640b6b472541af060d547c92eeaba5..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;
        }
@@ -529,6 +532,11 @@ toshiba_acpi_init(void)
 
        if (acpi_disabled)
                return -ENODEV;
+
+       if (!acpi_specific_hotkey_enabled){
+               printk(MY_INFO "Using generic hotkey driver\n");
+               return -ENODEV; 
+       }
        /* simple device detection: look for HCI method */
        if (is_valid_acpi_path(METHOD_HCI_1))
                method_hci = METHOD_HCI_1;