mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-26 13:59:42 +02:00
tools/atrf-gpio/atusb.c (gpio): _exit after USB error, to avoid futile cleanup
This commit is contained in:
parent
a73a8a2044
commit
e9debdd4ab
@ -66,11 +66,11 @@ static uint8_t gpio(struct atrf_dsc *dsc,
|
|||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
dump_port(port-1, *data, *dir, mask);
|
dump_port(port-1, *data, *dir, mask);
|
||||||
fprintf(stderr, "ATUSB_GPIO: %s\n", usb_strerror());
|
fprintf(stderr, "ATUSB_GPIO: %s\n", usb_strerror());
|
||||||
exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
if (res != 3) {
|
if (res != 3) {
|
||||||
fprintf(stderr, "ATUSB_GPIO: expected 3 bytes, got %d\n", res);
|
fprintf(stderr, "ATUSB_GPIO: expected 3 bytes, got %d\n", res);
|
||||||
exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
*data = buf[1];
|
*data = buf[1];
|
||||||
*dir = buf[2];
|
*dir = buf[2];
|
||||||
|
Loading…
Reference in New Issue
Block a user