aboutsummaryrefslogtreecommitdiff
path: root/samples/gpio-pci-idio-16.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/gpio-pci-idio-16.c')
-rw-r--r--samples/gpio-pci-idio-16.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c
index 3eb4cf0..3c87103 100644
--- a/samples/gpio-pci-idio-16.c
+++ b/samples/gpio-pci-idio-16.c
@@ -121,8 +121,10 @@ int main(int argc, char *argv[])
return -1;
}
ret = lm_ctx_drive(lm_ctx);
- if (ret != 0 && errno != EINTR) {
- fprintf(stderr, "failed to realize device emulation: %m\n");
+ if (ret != 0) {
+ if (ret != -ENOTCONN && ret != -EINTR) {
+ fprintf(stderr, "failed to realize device emulation: %m\n");
+ }
}
out:
lm_ctx_destroy(lm_ctx);