mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
amdgpu: print an error if the dup syscall fails
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
940a05c0ba
commit
aa38a59899
1 changed files with 6 additions and 1 deletions
|
|
@ -1796,7 +1796,12 @@ int amdgpu_plugin_restore_file(int id)
|
|||
* copy of the fd. CRIU core owns the duplicated returned fd, and amdgpu_plugin owns the fd stored in
|
||||
* tp_node.
|
||||
*/
|
||||
return dup(fd);
|
||||
fd = dup(fd);
|
||||
if (fd == -1) {
|
||||
pr_perror("unable to duplicate the render fd");
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
fd = open(AMDGPU_KFD_DEVICE, O_RDWR | O_CLOEXEC);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue