|
@@ -566,10 +566,13 @@ static void mct_u232_read_int_callback(struct urb *urb)
|
|
|
* Work-a-round: handle the 'usual' bulk-in pipe here
|
|
|
*/
|
|
|
if (urb->transfer_buffer_length > 2) {
|
|
|
- tty = tty_port_tty_get(&port->port);
|
|
|
if (urb->actual_length) {
|
|
|
- tty_insert_flip_string(tty, data, urb->actual_length);
|
|
|
- tty_flip_buffer_push(tty);
|
|
|
+ tty = tty_port_tty_get(&port->port);
|
|
|
+ if (tty) {
|
|
|
+ tty_insert_flip_string(tty, data,
|
|
|
+ urb->actual_length);
|
|
|
+ tty_flip_buffer_push(tty);
|
|
|
+ }
|
|
|
tty_kref_put(tty);
|
|
|
}
|
|
|
goto exit;
|