From 21d2cc741ff6ed4a659a4c5f8aba97b481b1e6d2 Mon Sep 17 00:00:00 2001 From: chao an Date: Mon, 7 Aug 2023 16:06:58 +0800 Subject: [PATCH] wireless/bluetooth: correct judgment conditions Signed-off-by: chao an --- wireless/bluetooth/bt_gatt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wireless/bluetooth/bt_gatt.c b/wireless/bluetooth/bt_gatt.c index 684e74c3fa..ae8a76cbb8 100644 --- a/wireless/bluetooth/bt_gatt.c +++ b/wireless/bluetooth/bt_gatt.c @@ -1220,7 +1220,7 @@ int bt_gatt_read_multiple(FAR struct bt_conn_s *conn, FAR struct bt_buf_s *buf; uint8_t i; - if (!conn && conn->state != BT_CONN_CONNECTED) + if (!conn || conn->state != BT_CONN_CONNECTED) { return -ENOTCONN; }