aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 220d8e0a75fb..6822d2595aff 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -909,6 +909,9 @@ static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)
909{ 909{
910 size_t parsed = 0; 910 size_t parsed = 0;
911 911
912 if (data_len < 2)
913 return false;
914
912 while (parsed < data_len - 1) { 915 while (parsed < data_len - 1) {
913 u8 field_len = data[0]; 916 u8 field_len = data[0];
914 917