[PATCH 5.10 493/529] tty: fix out-of-bounds access in tty_driver_lookup_tty()