]> Git Repo - linux.git/blobdiff - net/rose/rose_route.c
[TG3]: replace kmalloc+memset with kzalloc
[linux.git] / net / rose / rose_route.c
index 8631b65a7312c830d35e4d843163024432bac54e..7252344779a0c73cf699e53a82e7b85651b2e234 100644 (file)
@@ -48,8 +48,6 @@ static DEFINE_SPINLOCK(rose_route_list_lock);
 
 struct rose_neigh *rose_loopback_neigh;
 
-static void rose_remove_neigh(struct rose_neigh *);
-
 /*
  *     Add a new route to a node, and in the process add the node and the
  *     neighbour if it is new.
@@ -235,11 +233,8 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
 
        skb_queue_purge(&rose_neigh->queue);
 
-       spin_lock_bh(&rose_neigh_list_lock);
-
        if ((s = rose_neigh_list) == rose_neigh) {
                rose_neigh_list = rose_neigh->next;
-               spin_unlock_bh(&rose_neigh_list_lock);
                kfree(rose_neigh->digipeat);
                kfree(rose_neigh);
                return;
@@ -248,7 +243,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
        while (s != NULL && s->next != NULL) {
                if (s->next == rose_neigh) {
                        s->next = rose_neigh->next;
-                       spin_unlock_bh(&rose_neigh_list_lock);
                        kfree(rose_neigh->digipeat);
                        kfree(rose_neigh);
                        return;
@@ -256,7 +250,6 @@ static void rose_remove_neigh(struct rose_neigh *rose_neigh)
 
                s = s->next;
        }
-       spin_unlock_bh(&rose_neigh_list_lock);
 }
 
 /*
@@ -403,7 +396,7 @@ int rose_add_loopback_neigh(void)
 int rose_add_loopback_node(rose_address *address)
 {
        struct rose_node *rose_node;
-       unsigned int err = 0;
+       int err = 0;
 
        spin_lock_bh(&rose_node_list_lock);
 
@@ -439,7 +432,7 @@ int rose_add_loopback_node(rose_address *address)
 out:
        spin_unlock_bh(&rose_node_list_lock);
 
-       return 0;
+       return err;
 }
 
 /*
This page took 0.03243 seconds and 4 git commands to generate.