aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-05-02 12:02:09 +0100
committerMark Brown <broonie@kernel.org>2016-05-02 12:02:09 +0100
commit0ce8428ba9ea13098b828d0881e28368a108709c (patch)
tree12cbe5d9c27319b8a18ac9fc9cb44e3c5f35408c /drivers/usb/class/cdc-acm.c
parentASoC: Intel: Atom: fix boot warning (diff)
parentMerge remote-tracking branches 'asoc/fix/rt5640' and 'asoc/fix/wm8962' into asoc-linus (diff)
downloadwireguard-linux-0ce8428ba9ea13098b828d0881e28368a108709c.tar.xz
wireguard-linux-0ce8428ba9ea13098b828d0881e28368a108709c.zip
Merge tag 'asoc-fix-v4.6-rc5' into asoc-intel
ASoC: Fixes for v4.6 This is a fairly large collection of fixes but almost all driver specific ones, especially to the new Intel drivers which have had a lot of recent development. The one core fix is a change to the debugfs code to avoid crashes in some relatively unusual configurations.
Diffstat (limited to '')
-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;
}