zink: Do not shadow the variable ret

Allows to actually return `true` when requested.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27259>
This commit is contained in:
Corentin Noël 2024-01-25 11:46:11 +01:00 committed by Marge Bot
parent edc56f944a
commit 86aef4a3c4

View file

@ -2347,8 +2347,8 @@ zink_screen_import_dmabuf_semaphore(struct zink_screen *screen, struct zink_reso
.flags = DMA_BUF_SYNC_RW,
.fd = sync_file_fd,
};
int ret = drmIoctl(fd, DMA_BUF_IOCTL_IMPORT_SYNC_FILE, &import);
if (ret) {
int ioctl_ret = drmIoctl(fd, DMA_BUF_IOCTL_IMPORT_SYNC_FILE, &import);
if (ioctl_ret) {
if (errno == ENOTTY || errno == EBADF || errno == ENOSYS) {
assert(!"how did this fail?");
} else {