From a61cf369bf5b6ab027bcd89aba4427d0ef2bf683 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 24 May 2017 17:57:42 -0700 Subject: [PATCH] Bluetooth: AVDTP: Remove dead code The msgtype value is created using 'hdr & 3' which means that the resulting value can never be greater than 3. This fixes Coverity CID 166771. Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/avdtp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/subsys/bluetooth/host/avdtp.c b/subsys/bluetooth/host/avdtp.c index ec8a43fad8a..eb068cb9eac 100644 --- a/subsys/bluetooth/host/avdtp.c +++ b/subsys/bluetooth/host/avdtp.c @@ -161,10 +161,6 @@ void bt_avdtp_l2cap_recv(struct bt_l2cap_chan *chan, struct net_buf *buf) msgtype, sigid, tid); net_buf_pull(buf, sizeof(*hdr)); - if (msgtype > BT_AVDTP_REJECT) { - return; - } - /* validate if there is an outstanding resp expected*/ if (msgtype != BT_AVDTP_CMD) { if (session->req == NULL) {