tty: Correctly check if the opening of the file descriptor failed
tty: Correctly check if the opening of the file descriptor failed

eyolfson/weston,udoprog/weston,sir-murray/weston,Tarnyko/weston-xdg_surface_present,krezovic/weston,eyolfson/weston,Fantu/compositor-spice,mchalupa/weston,jonnylamb/weston,krezovic/weston,jonnylamb/weston,udoprog/weston,kwm81/weston,giucam/weston,kwm81/weston,xorgy/weston,Gnurou/weston,mchalupa/weston,Tarnyko/weston-xdg_surface_present,xorgy/weston,Fantu/compositor-spice,giucam/weston,Fantu/compositor-spice,Gnurou/weston,sir-murray/weston