diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-03-10 18:34:03 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 20:30:55 +0200 |
commit | 96ed748d9da03d091799f8107fce27d218fd8f5c (patch) | |
tree | f40933f65fc79f4a0e9d2aac28581e044dd77a3d /drivers/char/qtronix.c | |
parent | Export shm_align_mask and flush_data_cache_page. (diff) | |
download | linux-96ed748d9da03d091799f8107fce27d218fd8f5c.tar.xz linux-96ed748d9da03d091799f8107fce27d218fd8f5c.zip |
qtronix.c: Handle kmalloc failure.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/char/qtronix.c')
-rw-r--r-- | drivers/char/qtronix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/qtronix.c b/drivers/char/qtronix.c index 40a3cf62e1a8..601d09baf9d7 100644 --- a/drivers/char/qtronix.c +++ b/drivers/char/qtronix.c @@ -591,6 +591,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); |