]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] h8 janitor work
authorDave Jones <davej@suse.de>
Fri, 31 May 2002 03:44:35 +0000 (20:44 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Fri, 31 May 2002 03:44:35 +0000 (20:44 -0700)
o Check request_region result

drivers/char/h8.c

index 10fe6aac671badc2c4d35a59680ffdf11e4fb4d5..ba69f09fdb292ed47aac7832ab831fca359e4214 100644 (file)
@@ -299,9 +299,13 @@ static int __init h8_init(void)
         }
         printk(KERN_INFO "H8 at 0x%x IRQ %d\n", h8_base, h8_irq);
 
-        create_proc_info_entry("driver/h8", 0, NULL, h8_get_info);
+        if (!request_region(h8_base, 8, "h8"))
+        {
+               free_irq(h8_irq, NULL);
+               return -EIO;
+        }
 
-        request_region(h8_base, 8, "h8");
+        create_proc_info_entry("driver/h8", 0, NULL, h8_get_info);
 
        h8_alloc_queues();