]> err.no Git - linux-2.6/commit
[PATCH] USB Serial: clean tty fields on failed device open
authorFrank Gevaerts <frank.gevaerts@fks.be>
Wed, 14 Jun 2006 13:52:05 +0000 (15:52 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Jun 2006 22:04:17 +0000 (15:04 -0700)
commitb059c81af7a1759a911cfc20ce8a4bf47c435830
tree397568ad8fe0ebfd2ee504919f7ae8f12657703f
parent4186c29ca199063facdda49851b4c863699687b1
[PATCH] USB Serial: clean tty fields on failed device open

If either the driver's open() method or try_module_get() fails, we need to
set 'tty->driver_data' and 'port->tty' to NULL in serial_open(), otherwise
we'll get an OOPS in usb_device_disconnect() when the device is disconnected.

Signed-off-by: Frank Gevaerts <frank.gevaerts@fks.be>
Acked-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/usb-serial.c