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 <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2020-01-13 14:43:09 +01:00 committed by Johan Hedberg
commit e91f9804e6

View file

@ -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)) {