提交 96ed748d 编写于 作者: R Ralf Baechle

qtronix.c: Handle kmalloc failure.

Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 9ff77c46
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册