esc_calib properly cleanup on failure

- fixes CID 139514
This commit is contained in:
Daniel Agar
2017-10-31 08:10:51 +01:00
committed by Lorenz Meier
parent 21995bd4b7
commit 5436801435
+3 -3
View File
@@ -278,7 +278,7 @@ esc_calib_main(int argc, char *argv[])
if (ret != OK) {
PX4_ERR("PWM_SERVO_GET_COUNT");
return 1;
goto cleanup;
}
/* tell IO/FMU that its ok to disable its safety with the switch */
@@ -286,7 +286,7 @@ esc_calib_main(int argc, char *argv[])
if (ret != OK) {
PX4_ERR("PWM_SERVO_SET_ARM_OK");
return 1;
goto cleanup;
}
/* tell IO/FMU that the system is armed (it will output values if safety is off) */
@@ -294,7 +294,7 @@ esc_calib_main(int argc, char *argv[])
if (ret != OK) {
PX4_ERR("PWM_SERVO_ARM");
return 1;
goto cleanup;
}
printf("Outputs armed");