Fixed coverity CID #12543

This commit is contained in:
Lorenz Meier 2015-01-19 13:52:33 +01:00
parent a1a5a65dfa
commit 5aa75c8f00
1 changed files with 6 additions and 3 deletions

View File

@ -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