Skip to content

Commit 66a74e4

Browse files
committed
local: Handle errors of set_channel_name()
Handle errors of set_channel_name() instead of ignoring them. Signed-off-by: Paul Cercueil <[email protected]>
1 parent 5b67ddd commit 66a74e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

local.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,10 @@ static int create_device(void *d, const char *path)
17991799
for (i = 0; i < dev->nb_channels; i++) {
18001800
struct iio_channel *chn = dev->channels[i];
18011801

1802-
set_channel_name(chn);
1802+
ret = set_channel_name(chn);
1803+
if (ret < 0)
1804+
goto err_free_scan_elements;
1805+
18031806
ret = handle_scan_elements(chn);
18041807
free_protected_attrs(chn);
18051808
if (ret < 0)

0 commit comments

Comments
 (0)