Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[safe/jmp/linux-2.6] / drivers / char / qtronix.c
index 40a3cf6..1087530 100644 (file)
@@ -33,7 +33,6 @@
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <linux/config.h>
 
 /* 
  * NOTE:  
@@ -591,6 +590,11 @@ static int __init psaux_init(void)
                return retval;
 
        queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);
+       if (!queue) {
+               misc_deregister(&psaux_mouse);
+               return -ENOMEM;
+       }
+               
        memset(queue, 0, sizeof(*queue));
        queue->head = queue->tail = 0;
        init_waitqueue_head(&queue->proc_list);