Skip to content

Commit

Permalink
local: add omitted return value read from close() in local_close()
Browse files Browse the repository at this point in the history
Patch 4b0a7a2 ("local: handle error codes in local_close()") omitted
one return value read for close().
Coverity caught that. This patch reads the return value for
'close(pdata->cancel_fd);'

Signed-off-by: Alexandru Ardelean <[email protected]>
  • Loading branch information
commodo committed Aug 5, 2020
1 parent ef12218 commit a36fdf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ static int local_close(const struct iio_device *dev)
pdata->fd = -1;

if (pdata->cancel_fd > -1) {
close(pdata->cancel_fd);
ret1 = close(pdata->cancel_fd);
pdata->cancel_fd = -1;

if (ret1) {
Expand Down

0 comments on commit a36fdf6

Please sign in to comment.