Skip to content

Commit 4b32de5

Browse files
committed
local: local_buffer_enabled_set() does not set errno
This function returns the error code directly and does not set errno. Signed-off-by: Paul Cercueil <[email protected]>
1 parent 07a4f3b commit 4b32de5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

local.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,8 +1039,7 @@ static int local_close(const struct iio_device *dev)
10391039

10401040
ret1 = local_buffer_enabled_set(dev, false);
10411041
if (ret1) {
1042-
ret1 = -errno;
1043-
iio_strerror(errno, err_str, sizeof(err_str));
1042+
iio_strerror(-ret1, err_str, sizeof(err_str));
10441043
IIO_ERROR("Error during buffer disable: %s\n", err_str);
10451044
if (ret == 0)
10461045
ret = ret1;

0 commit comments

Comments
 (0)