Skip to content

Commit f4b3f62

Browse files
dNechitacristina-suteu
authored andcommitted
osc: Use device ID when name or label fails
The following error message was being displayed at startup: CRITICAL **: rx_update_device_sampling_freq: assertion 'device' failed This was due to the existence of: /sys/bus/iio/device/iio_sysfs_trigger which doesn't have the 'name' attribute. Signed-off-by: Dan Nechita <[email protected]>
1 parent 9b75f53 commit f4b3f62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: osc.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,8 @@ static void init_device_list(struct iio_context *_ctx)
18301830
}
18311831

18321832
rx_update_device_sampling_freq(
1833-
get_iio_device_label_or_name(dev), USE_INTERN_SAMPLING_FREQ);
1833+
get_iio_device_label_or_name(dev) ?: iio_device_get_id(dev),
1834+
USE_INTERN_SAMPLING_FREQ);
18341835
}
18351836
}
18361837

0 commit comments

Comments
 (0)