Reported by Coverity.
Fixes: fbcd167314 ("radv: Add on-demand compilation of built-in shaders.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
char path[PATH_MAX + 1];
struct stat st;
void *data = NULL;
+ bool ret = false;
if (!radv_builtin_cache_path(path))
return false;
if(read(fd, data, st.st_size) == -1)
goto fail;
- return radv_pipeline_cache_load(&device->meta_state.cache, data, st.st_size);
+ ret = radv_pipeline_cache_load(&device->meta_state.cache, data, st.st_size);
fail:
free(data);
close(fd);
- return false;
+ return ret;
}
static void