Commit 58eb17f155704062d76729d1fb7e23d3559ca86a

Authored by Denis Joseph Barrow
Committed by Linus Torvalds
1 parent ad36b88e2d

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/net/usb/hso.c
... ... @@ -2663,7 +2663,7 @@
2663 2663 serial->parent = hso_dev;
2664 2664 hso_dev->port_data.dev_serial = serial;
2665 2665  
2666   - if (port & HSO_PORT_MODEM) {
  2666 + if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) {
2667 2667 num_urbs = 2;
2668 2668 serial->tiocmget = kzalloc(sizeof(struct hso_tiocmget),
2669 2669 GFP_KERNEL);