v3dv: initialize fd variable for proper error handling
authorMaíra Canal <mcanal@igalia.com>
Sat, 31 Dec 2022 13:44:18 +0000 (10:44 -0300)
committerEric Engestrom <eric@engestrom.ch>
Wed, 11 Jan 2023 17:44:21 +0000 (17:44 +0000)
commit722f6676c8e108dd2e912619012ddf4e21ee6fe7
tree54d38befe9690c75b3df20e2f61ba24bb464e43a
parentc591be200ea2a728274ed9fb5b78d698545ef400
v3dv: initialize fd variable for proper error handling

Currently, process_singlesync_signals() checks if fd == -1 to handle
possible errors in the drmSyncobjExportSyncFile function. But, fd is not
initialized, which means that drmSyncobjExportSyncFile might fail and
the error will not be handled as fd might not be equal to -1.

Therefore, initialize the fd variable with value -1 to ensure proper
error handling.

cc: mesa-stable

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20475>
(cherry picked from commit a2252adde8235d5c4d78d9347527cd7914bb905a)
.pick_status.json
src/broadcom/vulkan/v3dv_queue.c