diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-23 22:54:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-23 22:54:03 -0700 |
commit | 06802a819a0a2d31c952c0624cea6cd00e4e50da (patch) | |
tree | 8ccd7c668c7fbd8f08cb89426006040217caf3f1 /net/atm/clip.c | |
parent | 9bd512f619cc116b7830134d7c9f6e404a38c7bf (diff) | |
parent | 8f3ea33a5078a09eba12bfe57424507809367756 (diff) | |
download | op-kernel-dev-06802a819a0a2d31c952c0624cea6cd00e4e50da.zip op-kernel-dev-06802a819a0a2d31c952c0624cea6cd00e4e50da.tar.gz |
Merge branch 'master' of ../net-2.6/
Conflicts:
net/ipv6/ndisc.c
Diffstat (limited to 'net/atm/clip.c')
-rw-r--r-- | net/atm/clip.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index d45971b..e82da67 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -943,6 +943,8 @@ static const struct file_operations arp_seq_fops = { }; #endif +static void atm_clip_exit_noproc(void); + static int __init atm_clip_init(void) { neigh_table_init_no_netlink(&clip_tbl); @@ -959,18 +961,22 @@ static int __init atm_clip_init(void) struct proc_dir_entry *p; p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); + if (!p) { + printk(KERN_ERR "Unable to initialize " + "/proc/net/atm/arp\n"); + atm_clip_exit_noproc(); + return -ENOMEM; + } } #endif return 0; } -static void __exit atm_clip_exit(void) +static void atm_clip_exit_noproc(void) { struct net_device *dev, *next; - remove_proc_entry("arp", atm_proc_root); - unregister_inetaddr_notifier(&clip_inet_notifier); unregister_netdevice_notifier(&clip_dev_notifier); @@ -1001,6 +1007,13 @@ static void __exit atm_clip_exit(void) clip_tbl_hook = NULL; } +static void __exit atm_clip_exit(void) +{ + remove_proc_entry("arp", atm_proc_root); + + atm_clip_exit_noproc(); +} + module_init(atm_clip_init); module_exit(atm_clip_exit); MODULE_AUTHOR("Werner Almesberger"); |