mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 17:43:34 +08:00
Fixed coverity CID #12543
This commit is contained in:
@@ -1637,12 +1637,15 @@ sensor_reset(int ms)
|
|||||||
|
|
||||||
fd = open(PX4FMU_DEVICE_PATH, O_RDWR);
|
fd = open(PX4FMU_DEVICE_PATH, O_RDWR);
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0) {
|
||||||
errx(1, "open fail");
|
errx(1, "open fail");
|
||||||
|
}
|
||||||
|
|
||||||
if (ioctl(fd, GPIO_SENSOR_RAIL_RESET, ms) < 0)
|
if (ioctl(fd, GPIO_SENSOR_RAIL_RESET, ms) < 0) {
|
||||||
err(1, "servo arm failed");
|
warnx("sensor rail reset failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user