Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 495b36b1 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by David S. Miller
Browse files

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: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b36ffc47
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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);