Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96ed748d authored by Ralf Baechle's avatar Ralf Baechle
Browse files

qtronix.c: Handle kmalloc failure.

parent 9ff77c46
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);