From e91f9804e63940776888589cfe35c33d2492380c Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Mon, 13 Jan 2020 14:43:09 +0100 Subject: [PATCH] Bluetooth: host: Fix error code when calling API before init Fix bt_conn_create_aute_le returning the wrong error code when bt_init has not been called yet. This is inconsistent with the rest of the API functions. Signed-off-by: Joakim Andersson --- subsys/bluetooth/host/conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index f532ed6a0a5..043517951a0 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -2082,7 +2082,7 @@ int bt_conn_create_auto_le(const struct bt_le_conn_param *param) int err; if (!atomic_test_bit(bt_dev.flags, BT_DEV_READY)) { - return -EINVAL; + return -EAGAIN; } if (!bt_le_conn_params_valid(param)) {