tty: serial_core: fix NULL struct tty pointer access in uart_write_wakeup