Skip to content

Commit

Permalink
iiod: Fix handling of error code for init_usb_daemon()
Browse files Browse the repository at this point in the history
The init_usb_daemon() returns a valid error code directly, which does
not have to be retrieved from the errno variable.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Dec 4, 2023
1 parent 608485b commit 33fadc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iiod/iiod.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ int main(int argc, char **argv)
if (WITH_IIOD_USBD && ffs_mountpoint) {
ret = init_usb_daemon(ffs_mountpoint, nb_pipes);
if (ret < 0) {
iio_strerror(errno, err_str, sizeof(err_str));
iio_strerror(-ret, err_str, sizeof(err_str));
IIO_ERROR("Unable to init USB: %s\n", err_str);

thread_pool_destroy(main_thread_pool);
Expand Down

0 comments on commit 33fadc9

Please sign in to comment.