summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/hso.c
diff options
context:
space:
mode:
authorDenis Joseph Barrow <D.Barow@option.com>2009-01-02 14:50:29 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-02 19:19:43 +0100
commit58eb17f155704062d76729d1fb7e23d3559ca86a (patch)
treef57641ce2ee171ce4647522d5c6759356280c4c1 /drivers/net/usb/hso.c
parenttty: Fix an ircomm warning and note another bug (diff)
downloadlinux-58eb17f155704062d76729d1fb7e23d3559ca86a.tar.xz
linux-58eb17f155704062d76729d1fb7e23d3559ca86a.zip
hso modem detect fix patch against Alan Cox'es tty tree
Fixed incorrect check for the modem port, this prevents crashes caused by issueing a tiocmget_submit_urb on endpoints which don't exist for non modem devices. Signed-off-by: Denis Joseph Barrow <D.Barow@option.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/usb/hso.c')
-rw-r--r--drivers/net/usb/hso.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index d974d970e5fd..148af34837f0 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2663,7 +2663,7 @@ static struct hso_device *hso_create_bulk_serial_device(
serial->parent = hso_dev;
hso_dev->port_data.dev_serial = serial;
- if (port & HSO_PORT_MODEM) {
+ if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) {
num_urbs = 2;
serial->tiocmget = kzalloc(sizeof(struct hso_tiocmget),
GFP_KERNEL);