[PATCH openEuler-5.10-LTS-SP1 29/36] tty: fix out-of-bounds access in tty_driver_lookup_tty()