@@ -88,7 +88,6 @@ struct sixpack {
88
88
struct net_device * dev ; /* easy for intr handling */
89
89
90
90
/* These are pointers to the malloc()ed frame buffers. */
91
- unsigned char * rbuff ; /* receiver buffer */
92
91
int rcount ; /* received chars counter */
93
92
unsigned char * xbuff ; /* transmitter buffer */
94
93
unsigned char * xhead ; /* next byte to XMIT */
@@ -544,7 +543,7 @@ static inline int tnc_init(struct sixpack *sp)
544
543
*/
545
544
static int sixpack_open (struct tty_struct * tty )
546
545
{
547
- char * rbuff = NULL , * xbuff = NULL ;
546
+ char * xbuff = NULL ;
548
547
struct net_device * dev ;
549
548
struct sixpack * sp ;
550
549
unsigned long len ;
@@ -574,10 +573,8 @@ static int sixpack_open(struct tty_struct *tty)
574
573
575
574
len = dev -> mtu * 2 ;
576
575
577
- rbuff = kmalloc (len + 4 , GFP_KERNEL );
578
576
xbuff = kmalloc (len + 4 , GFP_KERNEL );
579
-
580
- if (rbuff == NULL || xbuff == NULL ) {
577
+ if (xbuff == NULL ) {
581
578
err = - ENOBUFS ;
582
579
goto out_free ;
583
580
}
@@ -586,7 +583,6 @@ static int sixpack_open(struct tty_struct *tty)
586
583
587
584
sp -> tty = tty ;
588
585
589
- sp -> rbuff = rbuff ;
590
586
sp -> xbuff = xbuff ;
591
587
592
588
sp -> mtu = AX25_MTU + 73 ;
@@ -631,7 +627,6 @@ static int sixpack_open(struct tty_struct *tty)
631
627
632
628
out_free :
633
629
kfree (xbuff );
634
- kfree (rbuff );
635
630
636
631
free_netdev (dev );
637
632
@@ -676,7 +671,6 @@ static void sixpack_close(struct tty_struct *tty)
676
671
del_timer_sync (& sp -> resync_t );
677
672
678
673
/* Free all 6pack frame buffers after unreg. */
679
- kfree (sp -> rbuff );
680
674
kfree (sp -> xbuff );
681
675
682
676
free_netdev (sp -> dev );
0 commit comments