提交 495b36b1 编写于 作者: A Alexey Dobriyan 提交者: David S. Miller

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: NAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b36ffc47
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册