From: Paul M. <le...@us...> - 2002-05-01 16:01:33
|
Update of /cvsroot/linuxdc/linux-sh-dc/drivers/maple In directory usw-pr-cvs1:/tmp/cvs-serv27583/drivers/maple Modified Files: maple.c Log Message: Further cleanup. Make sure to free all those fun happy things that are allocated. Make sure to shoot kmapled on request_irq() failure, etc. Index: maple.c =================================================================== RCS file: /cvsroot/linuxdc/linux-sh-dc/drivers/maple/maple.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- maple.c 1 May 2002 15:47:13 -0000 1.6 +++ maple.c 1 May 2002 16:01:26 -0000 1.7 @@ -449,8 +449,12 @@ return 0; cleanup: + if (maple_sendbuf) + free_pages((unsigned long)maple_sendbuf, MAPLE_DMA_PAGES); + printk(KERN_INFO "maple: Register failed\n"); - return -ENOMEM; + + return -EINVAL; } static void exit_maple_low(void) @@ -1026,10 +1030,17 @@ return 0; - cleanup: - /* XXX: Must do proper clean-up */ +cleanup: + if (kmapled_pid) { + kill_proc(kmapled_pid, SIGTERM, 1); + wait_for_completion(&kmapled_exited); + } + + exit_maple_low(); + printk(KERN_INFO "maple: Register failed\n"); - return -ENOMEM; + + return -EINVAL; } |