tty: atmel_serial: fix a potential NULL pointer dereference