Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs...
[sfrench/cifs-2.6.git] / net / x25 / x25_forward.c
index 8738ec7ce69336dd1960d9e3c8c9a0e1fa68a0e4..25a81079396863af36ac7e2eedb27c1d43c00b1d 100644 (file)
  */
 #include <linux/if_arp.h>
 #include <linux/init.h>
+#include <linux/slab.h>
 #include <net/x25.h>
 
-struct list_head x25_forward_list = LIST_HEAD_INIT(x25_forward_list);
+LIST_HEAD(x25_forward_list);
 DEFINE_RWLOCK(x25_forward_list_lock);
 
 int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from,
@@ -118,13 +119,14 @@ int x25_forward_data(int lci, struct x25_neigh *from, struct sk_buff *skb) {
                goto out;
 
        if ( (skbn = pskb_copy(skb, GFP_ATOMIC)) == NULL){
-               goto out;
+               goto output;
 
        }
        x25_transmit_link(skbn, nb);
 
-       x25_neigh_put(nb);
        rc = 1;
+output:
+       x25_neigh_put(nb);
 out:
        return rc;
 }