linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Thu, 10 Mar 2005 17:34:09 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/03/10 17:34:03

Modified files:
        drivers/char   : qtronix.c 

Log message:
        Handle kmalloc failure.

diff -urN linux/drivers/char/qtronix.c linux/drivers/char/qtronix.c
--- linux/drivers/char/qtronix.c        2005/01/25 04:28:12     1.12
+++ linux/drivers/char/qtronix.c        2005/03/10 17:34:03     1.13
@@ -590,6 +590,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);

<Prev in Thread] Current Thread [Next in Thread>