Commit dad6b625 authored by Vinson Lee's avatar Vinson Lee Committed by Marge Bot

turnip: Fix file descriptor return.

Fix defect reported by Coverity Scan.

Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach the expression -1 inside this statement: return ret ? -1 : handle.fd;

Fixes: cec0bc73 ("turnip: rework fences to use syncobjs")
Signed-off-by: Vinson Lee's avatarVinson Lee <>
Reviewed-by: Jonathan Marek's avatarJonathan Marek <>
Part-of: <!7498>
parent fe3b5241
......@@ -913,8 +913,6 @@ tu_syncobj_to_fd(struct tu_device *device, struct tu_syncobj *sync)
int ret;
ret = ioctl(device->fd, DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD, &handle);
if (ret)
return 0;
return ret ? -1 : handle.fd;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment