diff -u -X /usr/dontdiff /linux.vanilla/drivers/char/pc_keyb.c /linux/drivers/char/pc_keyb.c --- /linux.vanilla/drivers/char/pc_keyb.c Tue Jun 12 10:51:25 2001 +++ /linux/drivers/char/pc_keyb.c Tue Jun 12 13:51:26 2001 @@ -1011,13 +1011,20 @@ static int __init psaux_init(void) { + int retval; + if (!detect_auxiliary_port()) return -EIO; - misc_register(&psaux_mouse); + if ((retval = misc_register(&psaux_mouse))) + return retval; + queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL); - if (queue == NULL) - panic("psaux_init(): out of memory"); + if (queue == NULL) { + printk(KERN_ERR "psaux_init(): out of memory\n"); + misc_deregister(&psaux_mouse); + return -ENOMEM; + } memset(queue, 0, sizeof(*queue)); queue->head = queue->tail = 0; init_waitqueue_head(&queue->proc_list);