summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-10-18 13:51:18 +0200
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-10-18 16:14:27 +0200
commit1cb99d7d2a7ecd26a9ddf54c99440416a22e0dc4 (patch)
treed7b18583efb70bda2de663cd46529404293104d8
parentaef07363360ddcf0d95673b7de2fc10f41cf3312 (diff)
binding: nfc: return error code in init() function
Change-Id: I8a86ddf385b96aeba86a7ea92ed71fc0972ce57a Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--binding/afm-nfc-binding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binding/afm-nfc-binding.c b/binding/afm-nfc-binding.c
index 70a8625..d5c8d0b 100644
--- a/binding/afm-nfc-binding.c
+++ b/binding/afm-nfc-binding.c
@@ -247,7 +247,7 @@ static int init(afb_api_t api)
pthread_t thread_id;
nfc_binding_data *data = get_libnfc_instance();
char **adapters = NULL;
- int num_adapters, ret;
+ int num_adapters, ret = 0;
presence_event = afb_daemon_make_event("presence");
@@ -277,7 +277,7 @@ static int init(afb_api_t api)
neardal_free_array(&adapters);
- return 0;
+ return ret;
}
static void subscribe(afb_req_t request)