tun: return proper error code from tun_do_read