Remove redundant error check after got_object_id_by_path(). An error code is always returned when the oid is NULL.