diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-05-17 21:12:50 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-05-17 21:12:50 -0400 |
commit | e7ca7f9fa2cda220ba807620c992ce77c33a32ea (patch) | |
tree | fb8a6c1abc638c5a79645f4b9f44ece7c67187b4 /drivers/usb/class/cdc-acm.c | |
parent | 5f0dfb7a9bcc8139958f59ecb9bbd7e738ae702d (diff) | |
parent | d65c8fff867a6450c58ce31572e883148a445ddf (diff) | |
download | linux-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.c | 4 |
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; } |