mpu6000: close fds before exit

This commit is contained in:
Andrew Tridgell 2013-12-08 20:46:54 +11:00 committed by Lorenz Meier
parent acd0a70dca
commit f0d84d4826
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}