Skip to content

Commit

Permalink
local: Handle errors of set_channel_name()
Browse files Browse the repository at this point in the history
Handle errors of set_channel_name() instead of ignoring them.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Jun 25, 2021
1 parent 5b67ddd commit 66a74e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,10 @@ static int create_device(void *d, const char *path)
for (i = 0; i < dev->nb_channels; i++) {
struct iio_channel *chn = dev->channels[i];

set_channel_name(chn);
ret = set_channel_name(chn);
if (ret < 0)
goto err_free_scan_elements;

ret = handle_scan_elements(chn);
free_protected_attrs(chn);
if (ret < 0)
Expand Down

0 comments on commit 66a74e4

Please sign in to comment.