From e03f2e249ee4dd1eb4ded6ad8869c12f2143ab2a Mon Sep 17 00:00:00 2001 From: Jaganath Kanakkassery Date: Thu, 15 Dec 2016 22:40:56 +0530 Subject: [PATCH] Bluetooth: RFCOMM: Remove unneeded NULL checks rfcomm_make_uih_msg() does not return NULL anymore. Change-Id: I8f49b85df8924af1e0d382e699e655a1ffe70662 Signed-off-by: Jaganath Kanakkassery --- subsys/bluetooth/host/rfcomm.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/subsys/bluetooth/host/rfcomm.c b/subsys/bluetooth/host/rfcomm.c index e108a401914..5795a658b26 100644 --- a/subsys/bluetooth/host/rfcomm.c +++ b/subsys/bluetooth/host/rfcomm.c @@ -568,9 +568,6 @@ static int rfcomm_send_msc(struct bt_rfcomm_dlc *dlc, uint8_t cr) uint8_t fcs; buf = rfcomm_make_uih_msg(dlc, cr, BT_RFCOMM_MSC, sizeof(*msc)); - if (!buf) { - return -ENOMEM; - } msc = net_buf_add(buf, sizeof(*msc)); /* cr bit should be always 1 in MSC */ @@ -730,9 +727,6 @@ static int rfcomm_send_pn(struct bt_rfcomm_dlc *dlc, uint8_t cr) uint8_t fcs; buf = rfcomm_make_uih_msg(dlc, cr, BT_RFCOMM_PN, sizeof(*pn)); - if (!buf) { - return -ENOMEM; - } BT_DBG("mtu %x", dlc->mtu);