Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <johan+linaro@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Johan Hovold and committed by
Luiz Augusto von Dentz
280939bd b33a0d29

-20
-20
drivers/bluetooth/btqca.c
··· 55 55 } 56 56 57 57 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 - } 63 58 64 59 if (edl->cresp != EDL_CMD_REQ_RES_EVT || 65 60 edl->rtype != rtype) { ··· 116 121 } 117 122 118 123 edl = (struct edl_event_hdr *)(skb->data); 119 - if (!edl) { 120 - bt_dev_err(hdev, "QCA read fw build info with no header"); 121 - err = -EILSEQ; 122 - goto out; 123 - } 124 124 125 125 if (edl->cresp != EDL_CMD_REQ_RES_EVT || 126 126 edl->rtype != EDL_GET_BUILD_INFO_CMD) { ··· 173 183 } 174 184 175 185 edl = (struct edl_event_hdr *)(skb->data); 176 - if (!edl) { 177 - bt_dev_err(hdev, "QCA Patch config with no header"); 178 - err = -EILSEQ; 179 - goto out; 180 - } 181 186 182 187 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != EDL_PATCH_CONFIG_CMD) { 183 188 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp, ··· 487 502 } 488 503 489 504 edl = (struct edl_event_hdr *)(skb->data); 490 - if (!edl) { 491 - bt_dev_err(hdev, "TLV with no header"); 492 - err = -EILSEQ; 493 - goto out; 494 - } 495 505 496 506 if (edl->cresp != EDL_CMD_REQ_RES_EVT || edl->rtype != rtype) { 497 507 bt_dev_err(hdev, "QCA TLV with error stat 0x%x rtype 0x%x",