iio: Error out when scale is parsed as 0.0

This commit is contained in:
Bastien Nocera
2021-08-14 10:33:15 +02:00
parent cb8b8c3282
commit 2f94e4981f

View File

@@ -298,6 +298,8 @@ build_channel_array (const char *device_dir,
current->generic_name);
if ((ret < 0) && (ret != -ENOENT))
goto error;
if (current->scale == 0.0)
goto error;
ret = iioutils_get_param_float (&current->offset,
"offset",