qemu-char: correct return value from chr_read functions