]> git.baikalelectronics.ru Git - kernel.git/commit
usb_serial: Fix oops when unexisting usb serial device is opened.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Thu, 25 Jun 2009 13:41:37 +0000 (14:41 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Jun 2009 18:24:26 +0000 (11:24 -0700)
commit87bfe77a7f5c671bee0ee5cb5069d3811620af23
tree0fc52fa5d10247a99c403dd83704415ac4dcb750
parentda5f6bd51c14671ad91e94405cd8daa20c4cfce3
usb_serial: Fix oops when unexisting usb serial device is opened.

This commit bea8a30230c41ff5fb9fac8695bd0e28dc18ef64 has stopped
properly checking if there is any usb serial associated with the tty in
the close function. It happens the close function is called by releasing
the terminal right after opening the device fails.

As an example, open fails with a non-existing device, when probe has
never been called, because the device has never been plugged. This is
common in systems with static modules and no udev.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/serial/usb-serial.c