提交 58eb17f1 编写于 作者: D Denis Joseph Barrow 提交者: Linus Torvalds

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: NDenis Joseph Barrow <D.Barow@option.com>
Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 ad36b88e
...@@ -2663,7 +2663,7 @@ static struct hso_device *hso_create_bulk_serial_device( ...@@ -2663,7 +2663,7 @@ static struct hso_device *hso_create_bulk_serial_device(
serial->parent = hso_dev; serial->parent = hso_dev;
hso_dev->port_data.dev_serial = serial; hso_dev->port_data.dev_serial = serial;
if (port & HSO_PORT_MODEM) { if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) {
num_urbs = 2; num_urbs = 2;
serial->tiocmget = kzalloc(sizeof(struct hso_tiocmget), serial->tiocmget = kzalloc(sizeof(struct hso_tiocmget),
GFP_KERNEL); GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册