cdc-acm: fix crash if flushed with nothing buffered
authorOliver Neukum <oneukum@suse.com>
Mon, 4 Apr 2016 12:30:53 +0000 (14:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2016 18:53:07 +0000 (11:53 -0700)
commit2a14759a03a0a57b2fc99b1e416180788b8ba24c
tree0c7ddf79ac0ecf03dfd6ba25f8549dbf64fac276
parentbf16200689118d19de1b8d2a3c314fc21f5dc7bb
cdc-acm: fix crash if flushed with nothing buffered

Under some circumstances acm_tty_flush_chars() is called
with no buffer to flush. We simply need to do nothing.

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c