Commit 94a39282 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tty: Add missing break statement

Being miss in first place.

For tty-major we either should understand the driver
we're handling, in the code above it's VT driver, so if minor
is pointing somewhere else -- it's unknown tty.

We need to look into every serial device we're going to
support if we can c/r it without problem. Thus 'break' prevent
us from potential problems.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 4912da57
...@@ -275,6 +275,7 @@ struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev) ...@@ -275,6 +275,7 @@ struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev)
*/ */
return &vt_driver; return &vt_driver;
/* Other minors points to UART serial ports */ /* Other minors points to UART serial ports */
break;
case USB_SERIAL_MAJOR: case USB_SERIAL_MAJOR:
case LOW_DENSE_SERIAL_MAJOR: case LOW_DENSE_SERIAL_MAJOR:
return &serial_driver; return &serial_driver;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment