mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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>
This commit is contained in:
parent
f4b4bc0c2f
commit
a2252adde8
1 changed files with 1 additions and 1 deletions
|
|
@ -490,7 +490,7 @@ process_singlesync_signals(struct v3dv_queue *queue,
|
|||
if (device->pdevice->caps.multisync)
|
||||
return VK_SUCCESS;
|
||||
|
||||
int fd;
|
||||
int fd = -1;
|
||||
drmSyncobjExportSyncFile(device->pdevice->render_fd,
|
||||
queue->last_job_syncs.syncs[V3DV_QUEUE_ANY],
|
||||
&fd);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue