aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose/rose_loopback.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-12-14 18:52:13 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-18 00:59:14 -0500
commita3d384029aa304f8f3f5355d35f0ae274454f7cd (patch)
tree6bdb628b439cde292317fa5e89e14977899855a5 /net/rose/rose_loopback.c
parenta159aaa328a02b0189774c58ae7d917b25d26852 (diff)
[AX.25]: Fix unchecked rose_add_loopback_neigh uses
rose_add_loopback_neigh uses kmalloc and the callers were ignoring the error value. Rewrite to let the caller deal with the allocation. This allows the use of static allocation of kmalloc use entirely. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rose/rose_loopback.c')
-rw-r--r--net/rose/rose_loopback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c
index 103b4d38f88a..3e41bd93ab9f 100644
--- a/net/rose/rose_loopback.c
+++ b/net/rose/rose_loopback.c
@@ -79,7 +79,8 @@ static void rose_loopback_timer(unsigned long param)
79 79
80 skb->h.raw = skb->data; 80 skb->h.raw = skb->data;
81 81
82 if ((sk = rose_find_socket(lci_o, rose_loopback_neigh)) != NULL) { 82 sk = rose_find_socket(lci_o, &rose_loopback_neigh);
83 if (sk) {
83 if (rose_process_rx_frame(sk, skb) == 0) 84 if (rose_process_rx_frame(sk, skb) == 0)
84 kfree_skb(skb); 85 kfree_skb(skb);
85 continue; 86 continue;
@@ -87,7 +88,7 @@ static void rose_loopback_timer(unsigned long param)
87 88
88 if (frametype == ROSE_CALL_REQUEST) { 89 if (frametype == ROSE_CALL_REQUEST) {
89 if ((dev = rose_dev_get(dest)) != NULL) { 90 if ((dev = rose_dev_get(dest)) != NULL) {
90 if (rose_rx_call_request(skb, dev, rose_loopback_neigh, lci_o) == 0) 91 if (rose_rx_call_request(skb, dev, &rose_loopback_neigh, lci_o) == 0)
91 kfree_skb(skb); 92 kfree_skb(skb);
92 } else { 93 } else {
93 kfree_skb(skb); 94 kfree_skb(skb);