tty_io: check return code of tty_register_device