Skip to content

Commit

Permalink
Fix: correct wrong comparison of return value in create_device()
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Menkuec <benjamin@menkuec.de>
  • Loading branch information
catkira committed May 27, 2024
1 parent 0d1d8cb commit 2d5210b
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 @@ -1251,7 +1251,7 @@ static int create_device(void *d, const char *path)

ret = (int)local_do_read_dev_attr(id, 0, "label", label, sizeof(label),
IIO_ATTR_TYPE_DEVICE);
if (ret < 0)
if (ret > 0)
label_ptr = label;

dev = iio_context_add_device(ctx, id, name_ptr, label_ptr);
Expand Down

0 comments on commit 2d5210b

Please sign in to comment.