There can be cases when members of the gscons_info struct are used
uninitialized, e. g. in, gserial_console_exit(), if gs_console_setup()
was not called before.

Signed-off-by: Felix Hädicke <felixhaedi...@web.de>
---
 drivers/usb/gadget/function/u_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/u_serial.c 
b/drivers/usb/gadget/function/u_serial.c
index e0cd1e4..5fedead 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -1043,7 +1043,7 @@ static struct tty_driver *gs_tty_driver;
 
 #ifdef CONFIG_U_SERIAL_CONSOLE
 
-static struct gscons_info gscons_info;
+static struct gscons_info gscons_info = {};
 static struct console gserial_cons;
 
 static struct usb_request *gs_request_new(struct usb_ep *ep)
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to