builtin-checkout.c: check error return from read_cache()