summaryrefslogtreecommitdiffstats
path: root/tools/iio/generic_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/iio/generic_buffer.c')
-rw-r--r--tools/iio/generic_buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index 32f389ebb94d..9f7b85bf6ada 100644
--- a/tools/iio/generic_buffer.c
+++ b/tools/iio/generic_buffer.c
@@ -364,8 +364,11 @@ int main(int argc, char **argv)
/* Enable the buffer */
ret = write_sysfs_int("enable", buf_dir_name, 1);
- if (ret < 0)
+ if (ret < 0) {
+ fprintf(stderr,
+ "Failed to enable buffer: %s\n", strerror(-ret));
goto error_free_buf_dir_name;
+ }
scan_size = size_from_channelarray(channels, num_channels);
data = malloc(scan_size * buf_len);