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:
Eric Engestrom 2026-05-16 19:48:27 +02:00 committed by Marge Bot
parent f8b61c96cf
commit c5e413533f

View file

@ -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;