summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb_wwan.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-03-04 10:40:22 +0100
committerIngo Molnar <mingo@elte.hu>2011-03-04 10:40:25 +0100
commit888a8a3e9d79cbb9d83e53955f684998248580ec (patch)
tree3dbf548438c77d89c8696a9a79c4129cdc2f3d3e /drivers/usb/serial/usb_wwan.c
parentcfff2d909cbdaf8c467bd321aa0502a548ec8f7e (diff)
parentb06b3d49699a52e8f9ca056c4f96e81b1987d78e (diff)
downloadblackbird-op-linux-888a8a3e9d79cbb9d83e53955f684998248580ec.tar.gz
blackbird-op-linux-888a8a3e9d79cbb9d83e53955f684998248580ec.zip
Merge branch 'perf/urgent' into perf/core
Merge reason: Pick up updates before queueing up dependent patches. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/usb/serial/usb_wwan.c')
-rw-r--r--drivers/usb/serial/usb_wwan.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index b004b2a485c3..9c014e2ecd68 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -295,12 +295,15 @@ static void usb_wwan_indat_callback(struct urb *urb)
__func__, status, endpoint);
} else {
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);
- } else
- dbg("%s: empty read urb received", __func__);
- tty_kref_put(tty);
+ if (tty) {
+ if (urb->actual_length) {
+ tty_insert_flip_string(tty, data,
+ urb->actual_length);
+ tty_flip_buffer_push(tty);
+ } else
+ dbg("%s: empty read urb received", __func__);
+ tty_kref_put(tty);
+ }
/* Resubmit urb so we continue receiving */
if (status != -ESHUTDOWN) {
OpenPOWER on IntegriCloud