Skip to content

Commit cbe8ba5

Browse files
committed
local: Don't check size of dequeued buffer vs. bytes_used
We already make sure in the high-level API (buffer.c) that bytes_used will always be smaller or equal than the buffer size. Therefore, the case where bytes_used is bigger than a newly dequeued block will never happen. Signed-off-by: Paul Cercueil <[email protected]>
1 parent 0e1a938 commit cbe8ba5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

local.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,6 @@ static ssize_t local_get_buffer(const struct iio_device *dev,
493493
return ret;
494494
}
495495

496-
/* Requested buffer size is too big! */
497-
if (pdata->last_dequeued < 0 && bytes_used > block.size)
498-
return -EFBIG;
499-
500496
pdata->last_dequeued = block.id;
501497
*addr_ptr = pdata->addrs[block.id];
502498
return (ssize_t) block.bytes_used;

0 commit comments

Comments
 (0)