diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-24 01:54:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 01:54:03 -0400 |
commit | 06802a819a0a2d31c952c0624cea6cd00e4e50da (patch) | |
tree | 8ccd7c668c7fbd8f08cb89426006040217caf3f1 /net/atm/clip.c | |
parent | 9bd512f619cc116b7830134d7c9f6e404a38c7bf (diff) | |
parent | 8f3ea33a5078a09eba12bfe57424507809367756 (diff) |
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 d45971bd286c..e82da6746723 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -943,6 +943,8 @@ static const struct file_operations arp_seq_fops = { | |||
943 | }; | 943 | }; |
944 | #endif | 944 | #endif |
945 | 945 | ||
946 | static void atm_clip_exit_noproc(void); | ||
947 | |||
946 | static int __init atm_clip_init(void) | 948 | static int __init atm_clip_init(void) |
947 | { | 949 | { |
948 | neigh_table_init_no_netlink(&clip_tbl); | 950 | neigh_table_init_no_netlink(&clip_tbl); |
@@ -959,18 +961,22 @@ static int __init atm_clip_init(void) | |||
959 | struct proc_dir_entry *p; | 961 | struct proc_dir_entry *p; |
960 | 962 | ||
961 | p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); | 963 | p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); |
964 | if (!p) { | ||
965 | printk(KERN_ERR "Unable to initialize " | ||
966 | "/proc/net/atm/arp\n"); | ||
967 | atm_clip_exit_noproc(); | ||
968 | return -ENOMEM; | ||
969 | } | ||
962 | } | 970 | } |
963 | #endif | 971 | #endif |
964 | 972 | ||
965 | return 0; | 973 | return 0; |
966 | } | 974 | } |
967 | 975 | ||
968 | static void __exit atm_clip_exit(void) | 976 | static void atm_clip_exit_noproc(void) |
969 | { | 977 | { |
970 | struct net_device *dev, *next; | 978 | struct net_device *dev, *next; |
971 | 979 | ||
972 | remove_proc_entry("arp", atm_proc_root); | ||
973 | |||
974 | unregister_inetaddr_notifier(&clip_inet_notifier); | 980 | unregister_inetaddr_notifier(&clip_inet_notifier); |
975 | unregister_netdevice_notifier(&clip_dev_notifier); | 981 | unregister_netdevice_notifier(&clip_dev_notifier); |
976 | 982 | ||
@@ -1001,6 +1007,13 @@ static void __exit atm_clip_exit(void) | |||
1001 | clip_tbl_hook = NULL; | 1007 | clip_tbl_hook = NULL; |
1002 | } | 1008 | } |
1003 | 1009 | ||
1010 | static void __exit atm_clip_exit(void) | ||
1011 | { | ||
1012 | remove_proc_entry("arp", atm_proc_root); | ||
1013 | |||
1014 | atm_clip_exit_noproc(); | ||
1015 | } | ||
1016 | |||
1004 | module_init(atm_clip_init); | 1017 | module_init(atm_clip_init); |
1005 | module_exit(atm_clip_exit); | 1018 | module_exit(atm_clip_exit); |
1006 | MODULE_AUTHOR("Werner Almesberger"); | 1019 | MODULE_AUTHOR("Werner Almesberger"); |