summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2016-05-17 21:12:50 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2016-05-17 21:12:50 -0400
commite7ca7f9fa2cda220ba807620c992ce77c33a32ea (patch)
treefb8a6c1abc638c5a79645f4b9f44ece7c67187b4 /drivers/usb/class/cdc-acm.c
parent5f0dfb7a9bcc8139958f59ecb9bbd7e738ae702d (diff)
parentd65c8fff867a6450c58ce31572e883148a445ddf (diff)
downloadlinux-e7ca7f9fa2cda220ba807620c992ce77c33a32ea.tar.bz2
Merge branch 'fixes' into misc
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r--drivers/usb/class/cdc-acm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 83fd30b0577c..a6c4a1b895bd 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -744,11 +744,15 @@ static void acm_tty_flush_chars(struct tty_struct *tty)
int err;
unsigned long flags;
+ if (!cur) /* nothing to do */
+ return;
+
acm->putbuffer = NULL;
err = usb_autopm_get_interface_async(acm->control);
spin_lock_irqsave(&acm->write_lock, flags);
if (err < 0) {
cur->use = 0;
+ acm->putbuffer = cur;
goto out;
}