iio: Error out when scale is parsed as 0.0
This commit is contained in:
@@ -298,6 +298,8 @@ build_channel_array (const char *device_dir,
|
|||||||
current->generic_name);
|
current->generic_name);
|
||||||
if ((ret < 0) && (ret != -ENOENT))
|
if ((ret < 0) && (ret != -ENOENT))
|
||||||
goto error;
|
goto error;
|
||||||
|
if (current->scale == 0.0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
ret = iioutils_get_param_float (¤t->offset,
|
ret = iioutils_get_param_float (¤t->offset,
|
||||||
"offset",
|
"offset",
|
||||||
|
Reference in New Issue
Block a user