From 6e9de099d551d2cfefe928bc367b3580bc5fde5f Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Fri, 12 Feb 2016 17:42:26 +0200 Subject: [PATCH] Bluetooth: Fix checking wrong variable Check server instead of psm after lookup. Change-Id: I80fe916432b69b376f04083980f1208aa7befbb1 Signed-off-by: Andrei Emeltchenko --- net/bluetooth/l2cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 759169c9a9d..c31d2fc552a 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -457,7 +457,7 @@ static void le_conn_req(struct bt_l2cap *l2cap, uint8_t ident, /* Check if there is a server registered */ server = l2cap_server_lookup_psm(psm); - if (!psm) { + if (!server) { rsp->result = BT_L2CAP_ERR_PSM_NOT_SUPP; goto rsp; }