USB: u_serial: Fix NULL pointer dereference in unthrottle callback

TTY may call unthrottle callback after port is closed.  This is
happening when tty is hung up during cable disconnect.  The tty's
driver data is set to NULL in port close.  Don't access driver data
in unthrottle callback.  There is nothing to do unthrottle callback
when port is closed.

CRs-Fixed: 463195
Change-Id: Iacedc30f6a5bc8e840d103e6e29f2f5b72b4f007
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index cc83fcf..70ff982 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -1053,6 +1053,13 @@
 	struct gs_port		*port = tty->driver_data;
 	unsigned long		flags;
 
+	/*
+	 * tty's driver data is set to NULL during port close.  Nothing
+	 * to do here.
+	 */
+	if (!port)
+		return;
+
 	spin_lock_irqsave(&port->port_lock, flags);
 	if (port->port_usb) {
 		/* Kickstart read queue processing.  We don't do xon/xoff,