From: Bill Pemberton Date: Wed, 13 Mar 2013 13:50:15 +0000 (-0400) Subject: USB: quatech2: only write to the tty if the port is open. X-Git-Tag: v3.9-rc3~17^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27b351c5546008c640b3e65152f60ca74b3706f1;p=pandora-kernel.git USB: quatech2: only write to the tty if the port is open. The commit 2e124b4a390ca85325fae75764bef92f0547fa25 removed the checks that prevented qt2_process_read_urb() from trying to put chars into ttys that weren't actually opened. This resulted in 'tty is NULL' warnings from flush_to_ldisc() when the device was used. The devices use just one read urb for all ports. As a result qt2_process_read_urb() may be called with the current port set to a port number that has not been opened. Add a check if the port is open before calling tty_flip_buffer_push(). Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed