[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200806092332.m59NW0wf014559@imap1.linux-foundation.org>
Date: Mon, 09 Jun 2008 16:32:00 -0700
From: akpm@...ux-foundation.org
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org,
adobriyan@...il.com, kkeil@...e.de
Subject: [patch 3/4] isdn divas: fix proc creation
From: Alexey Dobriyan <adobriyan@...il.com>
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@...il.com>
Cc: Karsten Keil <kkeil@...e.de>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
drivers/isdn/hardware/eicon/divasmain.c | 1 -
drivers/isdn/hardware/eicon/divasproc.c | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff -puN drivers/isdn/hardware/eicon/divasmain.c~isdn-divas-fix-proc-creation drivers/isdn/hardware/eicon/divasmain.c
--- a/drivers/isdn/hardware/eicon/divasmain.c~isdn-divas-fix-proc-creation
+++ a/drivers/isdn/hardware/eicon/divasmain.c
@@ -808,7 +808,6 @@ static int DIVA_INIT_FUNCTION divas_init
if (!create_divas_proc()) {
#ifdef MODULE
- remove_divas_proc();
divas_unregister_chrdev();
divasfunc_exit();
#endif
diff -puN drivers/isdn/hardware/eicon/divasproc.c~isdn-divas-fix-proc-creation drivers/isdn/hardware/eicon/divasproc.c
--- a/drivers/isdn/hardware/eicon/divasproc.c~isdn-divas-fix-proc-creation
+++ a/drivers/isdn/hardware/eicon/divasproc.c
@@ -125,8 +125,8 @@ static const struct file_operations diva
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);
_
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists