[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>
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 09f8a06..9e27946 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1487,6 +1487,10 @@
 	.func	= rose_route_frame
 };
 
+static struct ax25_linkfail rose_linkfail_notifier = {
+	.func	= rose_link_failed
+};
+
 static int __init rose_proto_init(void)
 {
 	int i;
@@ -1537,7 +1541,7 @@
 	register_netdevice_notifier(&rose_dev_notifier);
 
 	ax25_register_pid(&rose_pid);
-	ax25_linkfail_register(rose_link_failed);
+	ax25_linkfail_register(&rose_linkfail_notifier);
 
 #ifdef CONFIG_SYSCTL
 	rose_register_sysctl();
@@ -1585,7 +1589,7 @@
 	rose_rt_free();
 
 	ax25_protocol_release(AX25_P_ROSE);
-	ax25_linkfail_release(rose_link_failed);
+	ax25_linkfail_release(&rose_linkfail_notifier);
 
 	if (ax25cmp(&rose_callsign, &null_ax25_address) != 0)
 		ax25_listen_release(&rose_callsign, NULL);