[PATCH v0] hamradio: delete unnecessary free_netdev()
From: Lin Ma
Date: Thu Nov 11 2021 - 09:00:23 EST
The former patch "defer 6pack kfree after unregister_netdev" adds
free_netdev() function in sixpack_close(), which is a bad copy from the
similar code in mkiss_close(). However, this free is unnecessary as the
flag needs_free_netdev is set to true in sp_setup(), hence the
unregister_netdev() will free the netdev automatically.
Signed-off-by: Lin Ma <linma@xxxxxxxxxx>
---
drivers/net/hamradio/6pack.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index bfdf89e54752..180c8f08169b 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -677,8 +677,6 @@ static void sixpack_close(struct tty_struct *tty)
/* Free all 6pack frame buffers after unreg. */
kfree(sp->rbuff);
kfree(sp->xbuff);
-
- free_netdev(sp->dev);
}
/* Perform I/O control on an active 6pack channel. */
--
2.33.1