diff options
author | John Levon <john.levon@nutanix.com> | 2021-03-24 17:41:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 17:41:11 +0000 |
commit | 4f4c378978f0e22ec5b803496e2971adca6a3f8f (patch) | |
tree | 5f01e1ff807c1b57efe96332cf6be4e0abd285f7 /lib/dma.c | |
parent | 0c27dacfd1cf94609a8b07ece157ed83240915e0 (diff) | |
download | libvfio-user-4f4c378978f0e22ec5b803496e2971adca6a3f8f.zip libvfio-user-4f4c378978f0e22ec5b803496e2971adca6a3f8f.tar.gz libvfio-user-4f4c378978f0e22ec5b803496e2971adca6a3f8f.tar.bz2 |
_dma_addr_sg_split(): set errno when not found (#402)
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/dma.c')
-rw-r--r-- | lib/dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -410,7 +410,8 @@ out: if (!found) { // There is still a region which was not found. assert(len > 0); - cnt = -1; + errno = ENOENT; + return -1; } else if (cnt > max_sg) { cnt = -cnt - 1; } |