ret = kernel_snapshot_record(ksess, output, wait, nb_streams);
if (ret < 0) {
- ret = LTTNG_ERR_SNAPSHOT_FAIL;
if (ret == -EINVAL) {
ret = LTTNG_ERR_INVALID;
+ goto error_snapshot;
}
+
+ ret = LTTNG_ERR_SNAPSHOT_FAIL;
goto error_snapshot;
}
ret = ust_app_snapshot_record(usess, output, wait, nb_streams);
if (ret < 0) {
- ret = LTTNG_ERR_SNAPSHOT_FAIL;
if (ret == -EINVAL) {
ret = LTTNG_ERR_INVALID;
+ goto error_snapshot;
}
+
+ ret = LTTNG_ERR_SNAPSHOT_FAIL;
goto error_snapshot;
}