tty: Fix lock order in tty_do_resize()