]> err.no Git - linux-2.6/commitdiff
isdn divas: fix proc creation
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 10 Jun 2008 19:49:31 +0000 (12:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Jun 2008 19:49:31 +0000 (12:49 -0700)
1. creating proc entry and not saving pointer to PDE and checking it
   is not going to work.
2. if proc entry wasn't created, no reason to remove it on error path.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hardware/eicon/divasmain.c
drivers/isdn/hardware/eicon/divasproc.c

index 5fcbdccd7a5359aeac614524f37506785f47b59d..16a874bb15614bcd0a0bd58b27ecc3dd7edb7d15 100644 (file)
@@ -806,7 +806,6 @@ static int DIVA_INIT_FUNCTION divas_init(void)
 
        if (!create_divas_proc()) {
 #ifdef MODULE
-               remove_divas_proc();
                divas_unregister_chrdev();
                divasfunc_exit();
 #endif
index fae895828a1713317a0286d21f17a4fe6b051a38..040827288ec91ea43d3eb71b3cac194fa3adf4f9 100644 (file)
@@ -125,8 +125,8 @@ static const struct file_operations divas_fops = {
 
 int create_divas_proc(void)
 {
-       proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon,
-                   &divas_fops);
+       divas_proc_entry = proc_create(divas_proc_name, S_IFREG | S_IRUGO,
+                                       proc_net_eicon, &divas_fops);
        if (!divas_proc_entry)
                return (0);