tty_port_tty_get() was called without a corresponding tty_kref_put()
in qt_read_bulk_callback() and qt_close().
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (port_paranoia_check(port, __func__) != 0) {
dbg("%s - port_paranoia_check, exiting\n", __func__);
qt_port->ReadBulkStopped = 1;
if (port_paranoia_check(port, __func__) != 0) {
dbg("%s - port_paranoia_check, exiting\n", __func__);
qt_port->ReadBulkStopped = 1;
}
if (!serial) {
dbg("%s - bad serial pointer, exiting\n", __func__);
}
if (!serial) {
dbg("%s - bad serial pointer, exiting\n", __func__);
}
if (qt_port->closePending == 1) {
/* Were closing , stop reading */
dbg("%s - (qt_port->closepending == 1\n", __func__);
qt_port->ReadBulkStopped = 1;
}
if (qt_port->closePending == 1) {
/* Were closing , stop reading */
dbg("%s - (qt_port->closepending == 1\n", __func__);
qt_port->ReadBulkStopped = 1;
*/
if (qt_port->RxHolding == 1) {
qt_port->ReadBulkStopped = 1;
*/
if (qt_port->RxHolding == 1) {
qt_port->ReadBulkStopped = 1;
dbg("%s - nonzero read bulk status received: %d\n",
__func__, urb->status);
dbg("%s - nonzero read bulk status received: %d\n",
__func__, urb->status);
}
schedule_work(&port->work);
}
schedule_work(&port->work);
+exit:
+ tty_kref_put(tty);
-static void qt_close( struct usb_serial_port *port)
+static void qt_close(struct usb_serial_port *port)
{
struct usb_serial *serial = port->serial;
struct quatech_port *qt_port;
{
struct usb_serial *serial = port->serial;
struct quatech_port *qt_port;
/* wait up to for transmitter to empty */
if (serial->dev)
qt_block_until_empty(tty, qt_port);
/* wait up to for transmitter to empty */
if (serial->dev)
qt_block_until_empty(tty, qt_port);
/* Close uart channel */
status = qt_close_channel(serial, index);
/* Close uart channel */
status = qt_close_channel(serial, index);