ipwireless: fix potential tty == NULL dereference