From a3d384029aa304f8f3f5355d35f0ae274454f7cd Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 14 Dec 2006 15:52:13 -0800 Subject: [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 Signed-off-by: David S. Miller --- net/rose/rose_loopback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'net/rose/rose_loopback.c') 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) skb->h.raw = skb->data; - if ((sk = rose_find_socket(lci_o, rose_loopback_neigh)) != NULL) { + sk = rose_find_socket(lci_o, &rose_loopback_neigh); + if (sk) { if (rose_process_rx_frame(sk, skb) == 0) kfree_skb(skb); continue; @@ -87,7 +88,7 @@ static void rose_loopback_timer(unsigned long param) if (frametype == ROSE_CALL_REQUEST) { if ((dev = rose_dev_get(dest)) != NULL) { - if (rose_rx_call_request(skb, dev, rose_loopback_neigh, lci_o) == 0) + if (rose_rx_call_request(skb, dev, &rose_loopback_neigh, lci_o) == 0) kfree_skb(skb); } else { kfree_skb(skb); -- cgit v1.2.3