]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb-serial: don't release unregistered minors
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 14 Aug 2008 03:55:11 +0000 (03:55 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:15:20 +0000 (11:15 -0700)
commit1a3f36d7e251ed2f3df2fa89fc220ad2ce68d9ad
tree8f16edfb582e484a988dc242ab8610509180930b
parentae14e7c32b2bb1b4d37fd7f079769ad7715dfc5f
usb-serial: don't release unregistered minors

commit 0282b7f2a874e72c18fcd5a112ccf67f71ba7f5c upstream

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/usb-serial.c
include/linux/usb/serial.h