Skip to content

Commit 4c576b3

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
6pack: remove sixpack::rbuff
It's unused (except allocation and free). Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Andreas Koensgen <[email protected]> Cc: David S. Miller <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Paolo Abeni <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Jeremy Kerr <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent be9a284 commit 4c576b3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/net/hamradio/6pack.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ struct sixpack {
8888
struct net_device *dev; /* easy for intr handling */
8989

9090
/* These are pointers to the malloc()ed frame buffers. */
91-
unsigned char *rbuff; /* receiver buffer */
9291
int rcount; /* received chars counter */
9392
unsigned char *xbuff; /* transmitter buffer */
9493
unsigned char *xhead; /* next byte to XMIT */
@@ -544,7 +543,7 @@ static inline int tnc_init(struct sixpack *sp)
544543
*/
545544
static int sixpack_open(struct tty_struct *tty)
546545
{
547-
char *rbuff = NULL, *xbuff = NULL;
546+
char *xbuff = NULL;
548547
struct net_device *dev;
549548
struct sixpack *sp;
550549
unsigned long len;
@@ -574,10 +573,8 @@ static int sixpack_open(struct tty_struct *tty)
574573

575574
len = dev->mtu * 2;
576575

577-
rbuff = kmalloc(len + 4, GFP_KERNEL);
578576
xbuff = kmalloc(len + 4, GFP_KERNEL);
579-
580-
if (rbuff == NULL || xbuff == NULL) {
577+
if (xbuff == NULL) {
581578
err = -ENOBUFS;
582579
goto out_free;
583580
}
@@ -586,7 +583,6 @@ static int sixpack_open(struct tty_struct *tty)
586583

587584
sp->tty = tty;
588585

589-
sp->rbuff = rbuff;
590586
sp->xbuff = xbuff;
591587

592588
sp->mtu = AX25_MTU + 73;
@@ -631,7 +627,6 @@ static int sixpack_open(struct tty_struct *tty)
631627

632628
out_free:
633629
kfree(xbuff);
634-
kfree(rbuff);
635630

636631
free_netdev(dev);
637632

@@ -676,7 +671,6 @@ static void sixpack_close(struct tty_struct *tty)
676671
del_timer_sync(&sp->resync_t);
677672

678673
/* Free all 6pack frame buffers after unreg. */
679-
kfree(sp->rbuff);
680674
kfree(sp->xbuff);
681675

682676
free_netdev(sp->dev);

0 commit comments

Comments
 (0)