From c6c59174b3665897122cd9e0feebd6c666ee211c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 26 Aug 2013 08:11:52 +1000 Subject: [PATCH] AP_Airspeed: return when airspeed init fails --- libraries/AP_Airspeed/AP_Airspeed.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_Airspeed/AP_Airspeed.cpp b/libraries/AP_Airspeed/AP_Airspeed.cpp index 7dbd6589c6..c7366e9995 100644 --- a/libraries/AP_Airspeed/AP_Airspeed.cpp +++ b/libraries/AP_Airspeed/AP_Airspeed.cpp @@ -96,6 +96,7 @@ void AP_Airspeed::init() if (_ets_fd == -1) { hal.console->println("Failed to open ETS airspeed driver"); _enable.set(0); + return; } if (OK != ioctl(_ets_fd, SENSORIOCSPOLLRATE, 100) || OK != ioctl(_ets_fd, SENSORIOCSQUEUEDEPTH, 15)) {