aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorLorenz Meier <lorenz@px4.io>2015-01-20 12:24:42 +0100
committerLorenz Meier <lorenz@px4.io>2015-01-20 12:24:42 +0100
commitf3dcde39935766626155be70a88a89f4962af30a (patch)
treee8b8783ef0ecd64a1a321dad25d6078caf3d8eb9 /src/drivers
parent9b10395e94497ef16c99390460808409e08d468f (diff)
parent65915e5d01cd0b1b8aed95c827a4886f3a57e545 (diff)
downloadpx4-firmware-f3dcde39935766626155be70a88a89f4962af30a.tar.gz
px4-firmware-f3dcde39935766626155be70a88a89f4962af30a.tar.bz2
px4-firmware-f3dcde39935766626155be70a88a89f4962af30a.zip
Merge pull request #1671 from PX4/ekf_fix
Critical coverity fixes.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/px4fmu/fmu.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp
index 436672040..d3fee1626 100644
--- a/src/drivers/px4fmu/fmu.cpp
+++ b/src/drivers/px4fmu/fmu.cpp
@@ -1637,12 +1637,15 @@ sensor_reset(int ms)
fd = open(PX4FMU_DEVICE_PATH, O_RDWR);
- if (fd < 0)
+ if (fd < 0) {
errx(1, "open fail");
+ }
- if (ioctl(fd, GPIO_SENSOR_RAIL_RESET, ms) < 0)
- err(1, "servo arm failed");
+ if (ioctl(fd, GPIO_SENSOR_RAIL_RESET, ms) < 0) {
+ warnx("sensor rail reset failed");
+ }
+ close(fd);
}
void