Commit e26008f7 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] misc_register-004

From:  Michael Still <mikal@stillhq.com>
parent 0b83e76d
...@@ -585,7 +585,12 @@ static struct miscdevice psaux_mouse = { ...@@ -585,7 +585,12 @@ static struct miscdevice psaux_mouse = {
static int __init psaux_init(void) static int __init psaux_init(void)
{ {
misc_register(&psaux_mouse); int retval;
retval = misc_register(&psaux_mouse);
if(retval < 0)
return retval;
queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL); queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);
memset(queue, 0, sizeof(*queue)); memset(queue, 0, sizeof(*queue));
queue->head = queue->tail = 0; queue->head = queue->tail = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment