isdn divas: fix proc creation
Subsystems (2)
PATCH 3/4 isdn divas: fix proc creation
From: Alexey Dobriyan <[email protected]>
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 <[email protected]>
Cc Karsten Keil <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/isdn/hardware/eicon/divasmain.c | 1 - drivers/isdn/hardware/eicon/divasproc.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/isdn/hardware/eicon/divasmain.c renamed from drivers/isdn/hardware/eicon/divasmain.c~isdn-divas-fix-proc-creation +0 -1
@@ -808,7 +808,6 @@ static int DIVA_INIT_FUNCTION divas_initif (!create_divas_proc ()) {#ifdef MODULE -remove_divas_proc ();divas_unregister_chrdev ();divasfunc_exit ();#endif
drivers/isdn/hardware/eicon/divasproc.c renamed from drivers/isdn/hardware/eicon/divasproc.c~isdn-divas-fix-proc-creation +2 -2
@@ -125,8 +125,8 @@ static const struct file_operations divaint 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 );
_
From: [email protected]
Date: Mon, 09 Jun 2008 16:32:00 -0700
Quoted 6 lines
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 <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Applied to net-2.6, thanks.