aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/mpu6000
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2013-12-08 20:46:54 +1100
committerLorenz Meier <lm@inf.ethz.ch>2013-12-10 11:39:20 +0100
commit39b40e41c2126cb2aeba586a57333ebb2aa3c2a6 (patch)
tree7c06847100b3124753413253383c0eb2ff6a9486 /src/drivers/mpu6000
parent038ec194ae55c94d566a62f9e6e7dbcc0e0e7399 (diff)
downloadpx4-firmware-39b40e41c2126cb2aeba586a57333ebb2aa3c2a6.tar.gz
px4-firmware-39b40e41c2126cb2aeba586a57333ebb2aa3c2a6.tar.bz2
px4-firmware-39b40e41c2126cb2aeba586a57333ebb2aa3c2a6.zip
mpu6000: close fds before exit
Diffstat (limited to 'src/drivers/mpu6000')
-rw-r--r--src/drivers/mpu6000/mpu6000.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/mpu6000/mpu6000.cpp b/src/drivers/mpu6000/mpu6000.cpp
index 6145a5117..ff921274b 100644
--- a/src/drivers/mpu6000/mpu6000.cpp
+++ b/src/drivers/mpu6000/mpu6000.cpp
@@ -1405,6 +1405,8 @@ start()
if (ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0)
goto fail;
+ close(fd);
+
exit(0);
fail:
@@ -1508,6 +1510,8 @@ reset()
if (ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0)
err(1, "driver poll restart failed");
+ close(fd);
+
exit(0);
}