Skip to content

Commit

Permalink
hso modem detect fix patch against Alan Cox'es tty tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis Joseph Barrow authored and Linus Torvalds committed Jan 2, 2009
1 parent ad36b88 commit 58eb17f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 58eb17f

Please sign in to comment.