From 657c0a957e56998c878819147af019dbf713fa4f Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Tue, 2 May 2017 23:58:43 +0200 Subject: [PATCH] core: fix the return value of gpiod_simple_event_loop() This routine should always return 0 when no errors were encountered. Signed-off-by: Bartosz Golaszewski --- src/lib/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/core.c b/src/lib/core.c index cefa985..1d46a04 100644 --- a/src/lib/core.c +++ b/src/lib/core.c @@ -314,8 +314,10 @@ int gpiod_simple_event_loop(const char *consumer, const char *device, } status = callback(evtype, &event.ts, cbdata); - if (status == GPIOD_EVENT_CB_STOP) + if (status == GPIOD_EVENT_CB_STOP) { + status = 0; goto out; + } } out: -- 2.30.2