From 1cb99d7d2a7ecd26a9ddf54c99440416a22e0dc4 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Thu, 18 Oct 2018 13:51:18 +0200 Subject: binding: nfc: return error code in init() function Change-Id: I8a86ddf385b96aeba86a7ea92ed71fc0972ce57a Signed-off-by: Matt Ranostay --- binding/afm-nfc-binding.c | 4 ++-- 1 file 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) -- cgit 1.2.3-korg