qtronix.c: Handle kmalloc failure.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/drivers/char/qtronix.c b/drivers/char/qtronix.c
index 40a3cf6..601d09b 100644
--- a/drivers/char/qtronix.c
+++ b/drivers/char/qtronix.c
@@ -591,6 +591,11 @@
 		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);