From: Jiri Slaby (SUSE) Date: Tue, 21 Nov 2023 09:22:51 +0000 (+0100) Subject: tty: hso: don't initialize global serial_table X-Git-Tag: v6.8-rc1~59^2~108 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ccef1f142effe765a130c7b020c36eec6bd2a31;p=thirdparty%2Flinux.git tty: hso: don't initialize global serial_table 'serial_table' is global, so there is no need to initialize it to NULLs at the module load. Drop this unneeded for loop. Signed-off-by: "Jiri Slaby (SUSE)" Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231121092258.9334-11-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 48450fe861add..f088ea2ba6f39 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -3227,13 +3227,8 @@ static struct usb_driver hso_driver = { static int __init hso_init(void) { - int i; int result; - /* Initialise the serial table semaphore and table */ - for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) - serial_table[i] = NULL; - /* allocate our driver using the proper amount of supported minors */ tty_drv = tty_alloc_driver(HSO_SERIAL_TTY_MINORS, TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV);