Revert "tools/iio: Add memory allocation failure check for trigger_name"

This reverts commit 359d3145c9.
This commit is contained in:
Ksawlii 2024-11-24 00:22:58 +01:00
parent 4ff0839fae
commit 0d9e5720e8

View file

@ -479,10 +479,6 @@ int main(int argc, char **argv)
return -ENOMEM; return -ENOMEM;
} }
trigger_name = malloc(IIO_MAX_NAME_LENGTH); trigger_name = malloc(IIO_MAX_NAME_LENGTH);
if (!trigger_name) {
ret = -ENOMEM;
goto error;
}
ret = read_sysfs_string("name", trig_dev_name, trigger_name); ret = read_sysfs_string("name", trig_dev_name, trigger_name);
free(trig_dev_name); free(trig_dev_name);
if (ret < 0) { if (ret < 0) {