aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-12-14 15:51:23 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-17 21:59:11 -0800
commita4282717c102aef2bfab1d947c392de4d8abc0ec (patch)
treeef178b6eea8cd9a8790ae58a6c19ff2aa877bcc1 /include/net
parent58bc57471514be9206ebcda90b1076f6be41d1c7 (diff)
downloadkernel_samsung_espresso10-a4282717c102aef2bfab1d947c392de4d8abc0ec.zip
kernel_samsung_espresso10-a4282717c102aef2bfab1d947c392de4d8abc0ec.tar.gz
kernel_samsung_espresso10-a4282717c102aef2bfab1d947c392de4d8abc0ec.tar.bz2
[AX.25]: Fix unchecked ax25_linkfail_register uses
ax25_linkfail_register 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 'include/net')
-rw-r--r--include/net/ax25.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 51060ef..5ae10dd 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -342,8 +342,14 @@ struct ax25_protocol {
extern void ax25_register_pid(struct ax25_protocol *ap);
extern void ax25_protocol_release(unsigned int);
-extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int));
-extern void ax25_linkfail_release(void (*)(ax25_cb *, int));
+
+struct ax25_linkfail {
+ struct hlist_node lf_node;
+ void (*func)(ax25_cb *, int);
+};
+
+extern void ax25_linkfail_register(struct ax25_linkfail *lf);
+extern void ax25_linkfail_release(struct ax25_linkfail *lf);
extern int __must_check ax25_listen_register(ax25_address *,
struct net_device *);
extern void ax25_listen_release(ax25_address *, struct net_device *);