aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index cb817d503c14..22a10fadc8c6 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -45,8 +45,6 @@
45 45
46#define BCLINK_WIN_DEFAULT 20 /* bcast link window size (default) */ 46#define BCLINK_WIN_DEFAULT 20 /* bcast link window size (default) */
47 47
48#define BCLINK_LOG_BUF_SIZE 0
49
50/* 48/*
51 * Loss rate for incoming broadcast frames; used to test retransmission code. 49 * Loss rate for incoming broadcast frames; used to test retransmission code.
52 * Set to N to cause every N'th frame to be discarded; 0 => don't discard any. 50 * Set to N to cause every N'th frame to be discarded; 0 => don't discard any.
@@ -774,7 +772,6 @@ int tipc_bclink_init(void)
774 bcbearer = kzalloc(sizeof(*bcbearer), GFP_ATOMIC); 772 bcbearer = kzalloc(sizeof(*bcbearer), GFP_ATOMIC);
775 bclink = kzalloc(sizeof(*bclink), GFP_ATOMIC); 773 bclink = kzalloc(sizeof(*bclink), GFP_ATOMIC);
776 if (!bcbearer || !bclink) { 774 if (!bcbearer || !bclink) {
777 nomem:
778 warn("Multicast link creation failed, no memory\n"); 775 warn("Multicast link creation failed, no memory\n");
779 kfree(bcbearer); 776 kfree(bcbearer);
780 bcbearer = NULL; 777 bcbearer = NULL;
@@ -799,14 +796,6 @@ int tipc_bclink_init(void)
799 bcl->state = WORKING_WORKING; 796 bcl->state = WORKING_WORKING;
800 strlcpy(bcl->name, tipc_bclink_name, TIPC_MAX_LINK_NAME); 797 strlcpy(bcl->name, tipc_bclink_name, TIPC_MAX_LINK_NAME);
801 798
802 if (BCLINK_LOG_BUF_SIZE) {
803 char *pb = kmalloc(BCLINK_LOG_BUF_SIZE, GFP_ATOMIC);
804
805 if (!pb)
806 goto nomem;
807 tipc_printbuf_init(&bcl->print_buf, pb, BCLINK_LOG_BUF_SIZE);
808 }
809
810 return 0; 799 return 0;
811} 800}
812 801
@@ -815,8 +804,6 @@ void tipc_bclink_stop(void)
815 spin_lock_bh(&bc_lock); 804 spin_lock_bh(&bc_lock);
816 if (bcbearer) { 805 if (bcbearer) {
817 tipc_link_stop(bcl); 806 tipc_link_stop(bcl);
818 if (BCLINK_LOG_BUF_SIZE)
819 kfree(bcl->print_buf.buf);
820 bcl = NULL; 807 bcl = NULL;
821 kfree(bclink); 808 kfree(bclink);
822 bclink = NULL; 809 bclink = NULL;