intel/compiler: Return early if read() failed
This was the only warning I could see while compiling Iris. Reviewed-by: Matt Turner <mattst88@gmail.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2821> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2821>
This commit is contained in:

committed by
Marge Bot

parent
8490b7d917
commit
5f78524d9b
@@ -394,8 +394,11 @@ bool brw_try_override_assembly(struct brw_codegen *p, int start_offset,
|
|||||||
p->store = (brw_inst *)reralloc_size(p->mem_ctx, p->store, p->next_insn_offset);
|
p->store = (brw_inst *)reralloc_size(p->mem_ctx, p->store, p->next_insn_offset);
|
||||||
assert(p->store);
|
assert(p->store);
|
||||||
|
|
||||||
read(fd, p->store + start_offset, sb.st_size);
|
ssize_t ret = read(fd, p->store + start_offset, sb.st_size);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
if (ret != sb.st_size) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERTED bool valid =
|
ASSERTED bool valid =
|
||||||
brw_validate_instructions(p->devinfo, p->store,
|
brw_validate_instructions(p->devinfo, p->store,
|
||||||
|
Reference in New Issue
Block a user