dccp: Fix sparse warnings
[linux-2.6/cjktty.git] / net / dccp / ccids / lib / tfrc.c
blob97ecec0a8e769b2ddc13d927f7bf632895fcccfd
1 /*
2 * TFRC: main module holding the pieces of the TFRC library together
4 * Copyright (c) 2007 The University of Aberdeen, Scotland, UK
5 * Copyright (c) 2007 Arnaldo Carvalho de Melo <acme@redhat.com>
6 */
7 #include <linux/module.h>
8 #include <linux/moduleparam.h>
9 #include "tfrc.h"
11 #ifdef CONFIG_IP_DCCP_TFRC_DEBUG
12 int tfrc_debug;
13 module_param(tfrc_debug, bool, 0444);
14 MODULE_PARM_DESC(tfrc_debug, "Enable debug messages");
15 #endif
17 static int __init tfrc_module_init(void)
19 int rc = tfrc_li_init();
21 if (rc)
22 goto out;
24 rc = tfrc_tx_packet_history_init();
25 if (rc)
26 goto out_free_loss_intervals;
28 rc = tfrc_rx_packet_history_init();
29 if (rc)
30 goto out_free_tx_history;
31 return 0;
33 out_free_tx_history:
34 tfrc_tx_packet_history_exit();
35 out_free_loss_intervals:
36 tfrc_li_exit();
37 out:
38 return rc;
41 static void __exit tfrc_module_exit(void)
43 tfrc_rx_packet_history_exit();
44 tfrc_tx_packet_history_exit();
45 tfrc_li_exit();
48 module_init(tfrc_module_init);
49 module_exit(tfrc_module_exit);
51 MODULE_AUTHOR("Gerrit Renker <gerrit@erg.abdn.ac.uk>, "
52 "Ian McDonald <ian.mcdonald@jandi.co.nz>, "
53 "Arnaldo Carvalho de Melo <acme@redhat.com>");
54 MODULE_DESCRIPTION("DCCP TFRC library");
55 MODULE_LICENSE("GPL");