]> git.baikalelectronics.ru Git - kernel.git/commit
usb-serial: don't release unregistered minors
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 29 Jul 2008 16:01:04 +0000 (12:01 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Aug 2008 00:32:50 +0000 (17:32 -0700)
commit8c029da74930159d6fd8d551bc0a8d7bdb559b53
tree85db6db24e0ee5d8c018fa9b58a720d3da521b64
parentd728933b436a4819d11059c2313b384befd4298d
usb-serial: don't release unregistered minors

This patch (as1121) fixes a bug in the USB serial core.  When a device
is unregistered, the core will give back its minors -- even if the
device hasn't been assigned any!

The patch reserves the highest minor value (255) to mean that no minor
was assigned.  It also removes some dead code and does a small style
fixup.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/usb-serial.c
include/linux/usb/serial.h