Skip to content

Commit 280939b

Browse files
jhovoldVudentz
authored andcommitted
Bluetooth: qca: drop bogus edl header checks
The skb->data pointer is never NULL so drop the bogus sanity checks when initialising the EDL header pointer. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent b33a0d2 commit 280939b

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

drivers/bluetooth/btqca.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *ver,
5555
}
5656

5757
edl = (struct edl_event_hdr *)(skb->data);
58-
if (!edl) {
59-
bt_dev_err(hdev, "QCA TLV with no header");
60-
err = -EILSEQ;
61-
goto out;
62-
}
6358

6459
if (edl->cresp != EDL_CMD_REQ_RES_EVT ||
6560
edl->rtype != rtype) {
@@ -121,11 +116,6 @@ static int qca_read_fw_build_info(struct hci_dev *hdev)
121116
}
122117

123118
edl = (struct edl_event_hdr *)(skb->data);
124-
if (!edl) {
125-
bt_dev_err(hdev, "QCA read fw build info with no header");
126-
err = -EILSEQ;
127-
goto out;
128-
}
129119

130120
if (edl->cresp != EDL_CMD_REQ_RES_EVT ||
131121
edl->rtype != EDL_GET_BUILD_INFO_CMD) {
@@ -183,11 +173,6 @@ static int qca_send_patch_config_cmd(struct hci_dev *hdev)
183173
}
184174

185175
edl = (struct edl_event_hdr *)(skb->data);
186-
if (!edl) {
187-
bt_dev_err(hdev, "QCA Patch config with no header");
188-
err = -EILSEQ;
189-
goto out;
190-
}
191176

192177
if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != EDL_PATCH_CONFIG_CMD) {
193178
bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
@@ -502,11 +487,6 @@ static int qca_tlv_send_segment(struct hci_dev *hdev, int seg_size,
502487
}
503488

504489
edl = (struct edl_event_hdr *)(skb->data);
505-
if (!edl) {
506-
bt_dev_err(hdev, "TLV with no header");
507-
err = -EILSEQ;
508-
goto out;
509-
}
510490

511491
if (edl->cresp != EDL_CMD_REQ_RES_EVT || edl->rtype != rtype) {
512492
bt_dev_err(hdev, "QCA TLV with error stat 0x%x rtype 0x%x",

0 commit comments

Comments
 (0)