Skip to content

Commit

Permalink
local: local_buffer_enabled_set() does not set errno
Browse files Browse the repository at this point in the history
This function returns the error code directly and does not set errno.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Jun 10, 2021
1 parent 07a4f3b commit 4b32de5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,7 @@ static int local_close(const struct iio_device *dev)

ret1 = local_buffer_enabled_set(dev, false);
if (ret1) {
ret1 = -errno;
iio_strerror(errno, err_str, sizeof(err_str));
iio_strerror(-ret1, err_str, sizeof(err_str));
IIO_ERROR("Error during buffer disable: %s\n", err_str);
if (ret == 0)
ret = ret1;
Expand Down

0 comments on commit 4b32de5

Please sign in to comment.