Skip to content

Commit 495b36b

Browse files
Alexey Dobriyandavem330
authored andcommitted
isdn divas: fix proc creation
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>
1 parent b36ffc4 commit 495b36b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/isdn/hardware/eicon/divasmain.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,6 @@ static int DIVA_INIT_FUNCTION divas_init(void)
806806

807807
if (!create_divas_proc()) {
808808
#ifdef MODULE
809-
remove_divas_proc();
810809
divas_unregister_chrdev();
811810
divasfunc_exit();
812811
#endif

drivers/isdn/hardware/eicon/divasproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ static const struct file_operations divas_fops = {
125125

126126
int create_divas_proc(void)
127127
{
128-
proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon,
129-
&divas_fops);
128+
divas_proc_entry = proc_create(divas_proc_name, S_IFREG | S_IRUGO,
129+
proc_net_eicon, &divas_fops);
130130
if (!divas_proc_entry)
131131
return (0);
132132

0 commit comments

Comments
 (0)