mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 04:08:10 +02:00
etnaviv: initialize value before calling etna_gpu_get_param(), in case it fails
We could add an error check instead, but we actually need `features` to be fully
initialized and we'd be setting it to `0` in the else, so let's just initialize
`val = 0` and not have to care whether etna_gpu_get_param() succeeds.
Fixes: 358e1f10c5 ("etnaviv: drm: Initialize etna_core_info based on kernel features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41621>
This commit is contained in:
parent
f8b61c96cf
commit
c5e413533f
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ query_features_from_kernel(struct etna_gpu *gpu)
|
|||
STATIC_ASSERT(ETNA_GPU_FEATURES_12 == 0xf);
|
||||
|
||||
for (unsigned i = ETNA_GPU_FEATURES_0; i <= ETNA_GPU_FEATURES_12; i++) {
|
||||
uint64_t val;
|
||||
uint64_t val = 0;
|
||||
|
||||
etna_gpu_get_param(gpu, i, &val);
|
||||
features[i - ETNA_GPU_FEATURES_0] = val;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue