Skip to content

Commit

Permalink
isdn divas: fix proc creation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Jun 10, 2008
1 parent b36ffc4 commit 495b36b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion drivers/isdn/hardware/eicon/divasmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hardware/eicon/divasproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 495b36b

Please sign in to comment.